Clean and organize the text of a chat conversation with Python
Hi I have a df (like in the next example), I need to transform and clean a text that I obtained through webscraping methods. In the conversations, the user or the agent may not always have answered, but at least one of them is always present. But for the last conversation the date and time are not being obtained (image adj.). It also considers that the agent’s first name is always the one present in the conversation, but how could I modify the function so that it searched for any of the agent’s names?