Hi I have the following dataframe with headers and data
T | A - x | A - y | B - x | B - y |
1 m | a | b | c | d |
2 n | a | b | c | d |
where 1 and 2 are just index
How can I convert it to the two following formats?
T | A | A | B | B |
| x | y | x | y |
1 m | a | b | c | d |
2 n | a | b | c | d |
T | A | | B | |
| x | y | x | y |
1 m | a | b | c | d |
2 n | a | b | c | d |
thanks in advance