My table has the 12 months along the x-axis and the years along the y-axis and the data is the average price for each month. I need the data to be one column of data corresponding to the year/month in datetime format.
Jan | Feb | Mar | |
---|---|---|---|
1980 | .489 | .445 | .400 |
1981 | .523 | .567 | .600 |
I somehow achieved this with the .datetime() function within a tutorial but was not able to recreate it with my next .csv file. I looked at the documentation for .melt .pivot .pivot_table .wide_to_long and did not have success.
DateTime | Avg_Price |
---|---|
1980-Jan | .489 |
1980-Feb | .445 |
1980-Mar | .400 |
1981-Jan | .523 |
1981-Feb | .567 |
1981-Mar | .600 |