Series.
swaplevel
Swap levels i and j in a MultiIndex.
MultiIndex
Default is to swap the two innermost levels of the index.
Level of the indices to be swapped. Can pass level name as string.
Whether to copy underlying data.
Series with levels swapped in MultiIndex.