DataFrame :df
None | A B volumeshare volumeshare
X | 2020-10-1 2020-11-1
---------------------------------------
0 | e1 f1 12 65
1 | e1 f2 23 20
2 | e1 f3 0 91
3 | e2 f1 76 3
4 | e2 f2 89 33
I wish to achieve the below things -
- Only one top row with X, A, B, 2020-10-1, 2020-11-1 as the column names in that order.
- column 3 and 4 have timestamp names (2020-10-1 & 2020-11-1), need to replace it into string as Oct-20 and Nov-20 respectively.
Expected output
X | A B Oct-20 Nov-20
---------------------------------------
0 | e1 f1 12 65
1 | e1 f2 23 20
2 | e1 f3 0 91
3 | e2 f1 76 3
4 | e2 f2 89 33