return a pd series as a list of unique values 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()