how to count the unique string values in a column in pandas code example
Example 1: pandas count the number of unique values in a column
df['hID'].nunique()
5
Example 2: pandas count unique values in column
df.nunique()
df['hID'].nunique()
5
df.nunique()