Rearranging Data in Pandas
Look into the DataFrame.pivot method
I've been looking through the documentation (and stack overflow) and am having trouble figuring out how rearrange a pandas data frame the way described below. I wish to have a row where there is a column name, a row name and the value of that specific row and column:
Input:

  A B C
X 1 2 3
Y 4 5 6

Output:

X A 1
X B 2
X C 3
Y A 4
Y B 5
Y C 6

Any help would be much appreciated