Having the following dataframe,
0 1 2
A 0.2 0.4 0.6
B 0.1 0.1 0.3
How to achieve this transformation, while merging the row index with column name?
A_0 A_1 A_2 B_0 B_1 B_2
0 0.2 0.4 0.6 0.1 0.1 0.3