I have this df:
Month | TMAX | TMIN |
---|---|---|
January | 5.3 | 2.3 |
January | 8.5 | 2.2 |
January | 12.5 | 2.1 |
February | 20.3 | 1 |
February | 15.3 | 2 |
February | 12.3 | 3 |
March | 13.3 | 4 |
I want to generate month columns with their respective TMAX
values like this:
Month | JanuaryTMAX | FebruaryTMAX | MarchTMAX | JanuaryTMIN | FebruaryTMIN | MarchTMIN |
---|---|---|---|---|---|---|
... | 5.3 | 20.3 | 13.3 | 2.3 | 1 | 4 |
... | 8.5 | 15.3 | etc | 2.2 | 2 | etc |
... | 12.5 | 12.3 | etc | 2.1 | 3 | etc |
Would you mind to help me?
Thanks in advance.