I use pandas.Series.value_counts to count gender of users. But I also need to get the keys of a result to draw a plot and use keys as a label of the plot.
For example the result of data.gender.value_counts() is:
female 6700
male 6194
brand 5942
unknown 1117
And I need to get a list ['female', 'male', 'brand', 'unknown'] as well and keep the order.
How can I do that?