get distinct values from series pandas code example
Example: pandas unique values to list
df.groupby('param')['column'].nunique().sort_values(ascending=False).unique().tolist()
df.groupby('param')['column'].nunique().sort_values(ascending=False).unique().tolist()