pandas test unique values in dataframe code example Example 1: count unique values pandas df['hID'].nunique() 5 Example 2: pandas count unique values in column df.nunique()