-
DataFrame.swaplevel(i=-2,j=-1,axis=0)
Swap level i and j in a MultiIndex on a particular axis.
i,j
: int or str, Levels of the indices to be swapped.axis
: {0 or ‘index’, 1 or ‘columns’}, default 0. The axis to swap levels on . -
Sort object by labels (along an axis)
理解dataframe.swaplevel(1,0).sort_index()
猜你喜欢
转载自blog.csdn.net/The_Time_Runner/article/details/109171321
今日推荐
周排行