Introduction
Swapping index levels helps you change the order of row labels in a table so you can look at your data in a new way.
You want to group data by a different category first.
You need to sort or organize data differently for easier reading.
You want to prepare data for a specific analysis that requires a certain index order.
You are working with multi-level indexes and want to switch their positions.
You want to reshape your data without changing the actual values.