I have the following data frame.
ID Product quantity
9626 a 1
9626 b 1
9626 c 1
6600 f 1
6600 a 1
6600 d 1
And I want to join rows by ID. Below is an example of the results. (The quantity column is optional. This column is not necessary.)
ID Product quantity
9626 a,b,c 3
6600 a,d,f 3
I used merge and sum, but it did not work.
Is this problem solved only with a loop statement?
I'd appreciate it if you could provide me with a solution.