I have a table that needs to be transform in the following way
ID Item_ID Rank
0 12 1068 1.0
1 12 8914 2.0
2 12 7997 3.0
3 13 311 4.0
4 13 123 5.0
5 13 39 6.0
to
ID Item_ID_1 Item_ID_2 Item_ID_3
12 1068 8914 7997
13 311 123 39
I've tried pd.pivot
but gives me the error ValueError: Index contains duplicate entries, cannot reshape
but, of course that I have duplicated entries.
Please some kind of help!
Thanks