get number of unique elements in pandas column code example
Example 1: count unique pandas
df['column'].nunique()
Example 2: Count unique values Pandas
df = df.groupby('domain')['ID'].nunique()
df['column'].nunique()
df = df.groupby('domain')['ID'].nunique()