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