索引排序和按列排序参数不一样:
df.sort_index(level=0, ascending=False) df.sort_values(by='列名',ascending=True) #如果是多列, 写成列表的格式