0

party | jan |feb | march| april | may | june

--------|------|--------|------|--------|------ |-------

xyz | 0 | 0 | 100 | 200 | 10 | 10

abc | 10 | 0 | 100 | 200 | 10 | 10

pqr | 30 | 0 | 100 | 200 | 10 | 10

lmn | 50 | 0 | 100 | 200 | 10 | 10

Above is snapshot of dataset

What i am trying to do i want

Party | Month | Total

------ |-------|------

xyz | jan | 0 | feb | 0 | march| 100 | april| 200 | may | 10 | june | 10


abc | jan | 10 | feb | 0 | march| 100 | april| 200 | may | 10 | june | 10

i want to convert data in this format what should i do to convert it in this format

i tried in pandas with transpose method it not working

0 Answers0