I want to pivot a dataframe with duplicate values in one column to expose the associated values in new columns, as in the example below. From the Pandas documentation I just can't work out how to go from this...
name car model
rob mazda 626
rob bmw 328
james audi a4
james VW golf
tom audi a6
tom ford focus
To this...
name car_1 model_1 car_2 model_2
rob mazda 626 bmw 328
james audi a4 VW golf
tom audi a6 ford focus