I have a pandas dataframe that looks like
Event Person Data
Event1 Person1 Data1
Event1 Person2 Data2
Event1 Person3 Data3
Event2 Person1 Data4
Event2 Person2 Data5
Event2 Person3 Data6
and so on. I would like to create a new dataframe where the rows are the people (removing duplicates) and the columns are the events, and each cell is the particular datapoint corresponding to that event and that person. I can obviously just create a new dataframe and populate it iterating through the rows and columns of that dataframe, but I'm wondering if there's a slicker way?