I'm plotting this dataframe of 1-5 stars and it works fine.
5 4424
4 2177
1 1529
3 1070
2 800
However, i want to sort the indices in ascending order - "1,2,3,4,5", not plot it by the actual values:

the code that plots:
j.sort_index(by='stars').plot(kind='bar', rot = 1, figsize=(15,6))
I want the indexes to come in ascending order - 1,2,3,4,5.


j.sort_index(by='stars')toj.sort_index()how working?