Python pandas convert rows to columns where multiple columns exist [duplicate]
问题 This question already has answers here : how to unstack (or pivot?) in pandas (3 answers) Closed 2 years ago . I have a DF with multiple columns which I want to convert from rows to columns most solutions I have seen on stack overflow only deal with 2 columns From DF PO ID PO Name Region Date Price 1 AA North 07/2016 100 2 BB South 07/2016 200 1 AA North 08/2016 300 2 BB South 08/2016 400 1 AA North 09/2016 500 To DF PO ID PO Name Region 07/2016 08/2016 09/2016 1 AA North 100 300 500 2 BB