I have this data:
What I want to do is group this data by name, sort by number and join by the inter_type column.
So I want to have this kind of output:
I don't know how to do it. I know how to join them by group, but how to sort them? I have no idea how to implement here sort_values()?
df.groupby(['name'])['inter_type'].apply(lambda x: ','.join(x)).reset_index()

