I have a DataFrame as below
A B C
1 1 2 3
2 4 2 5
And I want to combine index and column into a new index while keeping the value from the previous column + index as below
Value
1A 1
1B 2
1C 3
2A 4
2B 2
2C 5
I know I can iterate through it with df.iterrows() and create a new DataFrame from that, but I'm working with a huge dataset and it is too inefficient. Dataset is tens of millions of observations.