initial code
num1 num2 num3
0 A a 1.1
1 A b 1.3
2 A c .8
3 B a .4
4 B b 1.2
5 B c 2.1
I want it to be
a b c
A 1.1 1.3 .8
B .4 1.2 2.1
I tried df.set_index('num1') and df.set_index('num2').T but they didn't seem to get what I wanted.