df.index = df.index.str.split('_', expand=True)
df1 = df.unstack(0)
df1.columns = ['_'.join((x[1], x[0])) for x in df1.columns]
print(df1)
how to convert the format of a dataframe from two rows to single