SyntaxFix
Write A Post
Hire A Developer
Questions
I stumbled on this question while trying to do the same thing (I think). Here is how I did it:
df['index_col'] = df.index
You can then sort on the new index column, if you like.