So I got a DataFrame as follow:
Col_0 Col_1
Index_1
A 0 2
A 3 1
A 2 2
B 3 1
B 4 3
B 5 1
And I would like to reshape to it into following format:
Col_0 Col_1
A B A B
0 3 2 1
3 4 1 3
2 5 2 1
I've try pandas.pivot
, pandas.unstack
, pandas.groupby
. None of it worked. Can anyone help me out with it? Much appreciated.