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