I have a pandas dataFrame in the following format
ID Name
0 1 Jim
1 1 Jimmy
2 2 Mark
3 2 Marko
4 3 Sergi
4 3 Sergi
I want to reshape the dataframe in the following format
ID Name_1 Name_2
0 1 Jim Jimmy
1 2 Mark Marko
2 3 Sergi Sergi
So that I can compare the two names. I am unable to use pd.pivot or pd.pivottable for this requirement.
Should be fairly simple. Please, can you suggest how to do this?