pandas dataframe unique values of two columns code example
Example 1: pandas count the number of unique values in a column
df['hID'].nunique()
5
Example 2: dataframe python unique values rows
# get the unique values (rows)
df.drop_duplicates()
df['hID'].nunique()
5
# get the unique values (rows)
df.drop_duplicates()