I have used GroupBy to sum the 'Amount' in the dataframe data_2020 .
data_2020.groupby(['Category'])['Amount'].sum().sort_values(ascending=False)
Now, I want to sort by the column 'Category'. I have tried to use sort_values(by=['Category'], inplace=True) but now I am getting an error message :
TypeError: sort_values() got an unexpected keyword argument 'by'
How I can sort by column 'Category'?