If i have a following dataframe:
id categories products
01 fruit Apple, Apricot
02 fruit Apple, Banana, Clementine, Pear
03 fruit Orange, Pineapple, Pear
04 vegetable Carrot, Cabbage
and i want create a new df like this, what i should do? thanks.
id products
01 (fruit)Apple, Apricot
02 (fruit)Apple, Banana, Clementine, Pear
03 (fruit)Orange, Pineapple, Pear
04 (vegetable)Carrot, Cabbage