Answers for "dataframe unique rows"

4

dataframe unique values in each column

for col in df:
    print(df[col].unique())
Posted by: Guest on August-20-2020
0

distinct rows in this DataFrame

# distinct rows in this DataFrame

df.distinct().count()
# 2
Posted by: Guest on April-20-2020
0

how to get unique value of all columns in pandas

print(df.apply(lambda col: col.unique()))
Posted by: Guest on August-05-2021
-1

Returns a new DataFrame containing the distinct rows in this DataFrame

# Returns a new DataFrame containing the distinct rows in this DataFrame

df.ditinct().count()
# 2
Posted by: Guest on April-07-2020

Code answers related to "dataframe unique rows"

Python Answers by Framework

Browse Popular Code Answers by Language