function to count unique values python code example Example: pandas count unique values in column df.nunique()