I want to convert this dataframe (note that 'ABC' is the index name):
t1 t2 t3
ABC
gp 7 11 26
fp 6 14 23
pm 3 -1 7
wm 2 -2 9
to this dataframe:
s1 tx gp fp pm wm
0 ABC t1 7 6 3 2
1 ABC t2 11 14 -1 -2
2 ABC t3 26 23 7 9
What's the best way to perform this function?