import pandas as pd # Sort index from outer to inner in ascending order df = df.sort_index() # Display DataFrame print(df)