I transpose a DF which columns where dates and rows variables. So it's now has the forms of Dates as column head (but I want them to be a column value named Date) and the rows are now columns.
How can I move from column headers to column vuales so the date which was originally header and is now and index transform it into a new variables which has the name "Date", thank you
Current:
df
c d
a 1 2
b 3 4
I would like to get this:
df
col1 col2 col3
0 a c 1
1 a d 2
2 b c 3
3 b d 4
