1

I've got some output data in a dataframe that looks like:

Region             Temp   Date
NEW ENGLAND        0      05-Apr
MIDDLE ATLANTIC    1      05-Apr
E N CENTRAL        1      05-Apr
W N CENTRAL        9      05-Apr
.
.
.
NEW ENGLAND        5      06-Apr
MIDDLE ATLANTIC    7      06-Apr
.
.
.

The Region repeats itself for each Date but I want to organize it so that it looks like:

   NEW ENGLAND Temp   MIDDLE ATLANTIC Temp......    Date
    0                         1                     05-Apr
    5                         7                     06-Apr
    .
    .
    .

Is there a way to merge on or groupby the entire frame to get this format?

HelloToEarth
  • 2,027
  • 3
  • 22
  • 48
  • 1
    slice the dataframe then check https://stackoverflow.com/questions/47152691/how-to-pivot-a-dataframe – BENY Oct 22 '18 at 15:19

0 Answers0