I have a dataframe that looks like this:
Portfolio Id | Title | Collection Name | Price | Collection Type |
---|---|---|---|---|
12345 | onion rings | Things for wear | 50.00 | Clothes |
67890 | onion rings | Things you eat | 25.00 | Food |
I need it to look like this:
Title | Clothes_CollName | Clothes_Price | Food_CollName | Clothes_Price |
---|---|---|---|---|
onion rings | Things for wear | 50.00 | Things you eat | 25.00 |
I have tried working with groupby, pivot (and pivot_table), and unstack, but I can't keep things straight. I am fairly new to data analysis with pandas and sincerely appreciate any guidance the collective can provide.