Concat rows according to the category

Viewed 31

I need to write a code which can concat all the sentences present in a dataframe according to the category.

For example:

Colour sentences
Red roses are red
Blue sky is blue
Red Red is my favourite colour
Blue Oceans are blue

Expected output:

Colour sentences
Red roses are red Red is my favourite colour
Blue sky is blue Oceans are blue
0 Answers
Related