count unique observations python excel code example
Example 1: how to count unique values in a column dataframe in python
dataframe.column.nunique()
Example 2: count unique values pandas
df['hID'].nunique()
5
Example 3: pandas count distinct values in a column
Series.value_counts(self, normalize=False, sort=True, ascending=False, bins=None, dropna=True)
Example 4: pandas count unique values in column
df.nunique()