DataFrame.
swaplevel
Swap levels i and j in a MultiIndex on a particular axis.
Levels of the indices to be swapped. Can pass level name as string.