I have a pandas DataFrame like this:
Index User Message
1 User1 This is
2 User1 a test.
3 User2 The test
4 User2 is received.
5 User1 This is a complete sentence.
6 User2 This is another complete sentence.
7 User1 Finished.
I need a way to combine the messages when a user sends more than one message before the other while keeping the original order.
Desired output:
Index User Message
1 User1 This is a test.
2 User2 The test is received
3 User1 This is a complete sentence.
4 User2 This is another complete sentence.
5 User1 Finished.
Is this possible with pandas?