I feel like this is a simply question, but I do not use pandas that often. Suppose I have a dataframe like this:
d = {'repeat': [23, 25,23], 'unique': [1,2,3]}
df = pd.DataFrame(data=d)
How do I obtain, using pandas built-in function a dataframe of this form:
grouped = {'unique': [[1,3],[2]], 'repeat': [23,25]}
dg =pd.DataFrame(data=grouped)
df -- pandas built-in operations --> dg?
Thanks