find unique values in a column pandas with occurrences code example Example: pandas count the number of unique values in a column df['hID'].nunique() 5