pandas count unique values in and give size column code example Example: how to count unique values in a column dataframe in python dataframe.column.nunique()