So my dataframe is pretty complex but i'll keep the important details. This is the dataframe:
id name categorycode
0003F8 Car A
0003F8 Car A
0003F8 Car A
0003F8 Car AVB-A
0003F8 Car B
0003F8 Car B-T
0003F8 Car BTH
0003U7 Bike A
0003U7 Bike A
0003U7 Bike A-G
0003U7 Bike ATH
0003U7 Bike ATH
0003U7 Bike AVB-A
0003U7 Bike AVB-A
0003U7 Bike AVB-A
0003U7 Bike AVB-A
What I want it to look like is this:
id name categorycode
0003F8 Car A, AVB-A, B, B-T, BTH
0003U7 Bike A, A-G, ATH, AVB-A
So basically what i want is that only the categorycode values will be changed, and that the name values won't be changed. I'm not sure what the best practice is to use to achieve this. All the help would be greatly appreciated.