Sort pandas dataframe both on values of a column and index?

后端 未结 8 1636
被撕碎了的回忆
被撕碎了的回忆 2020-12-13 08:43

Is it feasible to sort pandas dataframe by values of a column, but also by index?

If you sort a pandas dataframe by values of a column, you can get the resultant dat

8条回答
  •  情书的邮戳
    2020-12-13 09:13

    I solve this problem next way:

    df.to_csv('df.csv', index = False)
    df = df.read_csv('df.csv')
    

提交回复
热议问题