Please help me edit the title if there's a better phrasing once you read the question.
I have data that looks like this:
Location Date Item Price
12 1 A 1
12 2 A 2
12 3 A 4
13 1 A 1
13 2 A 4
12 1 B 1
12 2 B 8
13 1 B 1
13 2 B 2
13 3 B 11
I want to use location and date to create a new variable for each item that is that items price, for example, the output I want is:
Location Date PriceA PriceB
12 1 1 1
12 2 2 8
12 3 4 NaN
13 1 1 1
13 2 4 2
13 3 NaN 11