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 |