I have this pandas data frame:
df = DataFrame({'B' : ('A','B','C','D','E','F','G'), 'C' : (1,3,5,6,8,2,5), 'D' : (5,2,6,9,3,7,3)})
B C D
0 A 1 5
1 B 3 2
2 C 5 6
3 D 6 9
4 E 8 3
5 F 2 7
6 G 5 3
I need to make computations excel. The format that would be convenient for me is:
B description value
0 A C 1
1 B C 3
2 C C 5
3 D C 6
4 E C 8
5 F C 2
6 G C 5
7 A D 5
8 B D 2
9 C D 6
10 D D 9
11 E D 3
12 F D 7
13 G D 3
is there a way to use the column names as value