df_swap = df.stack().reset_index(level=1).set_index(0, append=True).unstack(
    level=1)
df_swap.columns = df_swap.columns.get_level_values(1)
df_swap
How to swap a group of column headings with their values in Pandas