select unique rows pandas code example
Example 1: distinct rows in this DataFrame
# distinct rows in this DataFrame
df.distinct().count()
# 2
Example 2: dataframe python unique values rows
# get the unique values (rows)
df.drop_duplicates()
# distinct rows in this DataFrame
df.distinct().count()
# 2
# get the unique values (rows)
df.drop_duplicates()