I have a large weather dataset in this format:
'Daily Mean Temp for place name 2015' # One table title per year
'Day' 'JAN' 'FEB' 'MAR' ... 'DEC'
1 23 26 21 ... 14
2 20 30 22 ... 12
3 26 27 22 ... 16
... ... ... ... ... ...
31 28 - 19 ... 11
And I want to get it into this format:
'date' 'mean_temp'
2015-01-01 23
2015-01-02 20
2015-01-03 26
I have been unable to find a solution and would appreciate any ideas?
First map your months and then unpivot your df
Then add new column with your date (if date is not exists it is naT)
Drop unneeded columns & invalid dates
Set date as index