Say we have used pandas dataframe[column].value_counts() which outputs:
dataframe[column].value_counts()
apple 5 sausage 2 banana 2 cheese 1
How do yo
Try this:
dataframe[column].value_counts().index.tolist() ['apple', 'sausage', 'banana', 'cheese']