I am plotting some counts from a field of dataframe (pandas) and I found that the X axis is sorted by the counts (descending order). Instead is it possible to sort by the alphabetical order of the field?
Here is the Python code:
df['cartype'].value_counts().plot(kind='bar')
This sorts by the count but I want to sort by the cartype names. Any solution?