I'm working on big text data frame that looks like this:
ID  CustomerName     topics_seq  topics_count   log  
812199329          ['Due'/'Shift']      2     ["Agent: Hello", "Customer: Hello: Can you help?"] 
813447595          ['Shift']            1     ["Customer: Alright let's go", "Agent: Due to"]
I would like to split, to a new row the log column for each agent or customer, so something like this:
ID  CustomerName     topics_seq  topics_count   log  
812199329.1          ['Due'/'Shift']      2     ["Agent: Hello",
812199329.2          ['Due'/'Shift']      2     "Customer: Hello: Can you help?"]
813447595.1          ['Shift']            1     ["Customer: Alright let's go",
813447595.2          ['Shift']            1     "Agent: Due to"]
I wrote something like that but this is not what I wanted:
df = df['log'].str.split('Agent|Customer', '/n')
Please help.
 
    