python multi index column swap heading code example
Example: how to swirtch the placement of the levels in pandas
df.swaplevel('col_3','col_1',axis='index')
# index = 0, columns = 1 for axis.
df.swaplevel('col_3','col_1',axis='index')
# index = 0, columns = 1 for axis.