Here's the thing, I have this sort of dataset (let's call it df):
id text
A1 How was your experience?: Great\nWhat did you buy?: A book\n
B1 How was your experience?: Good\nWhat did you buy?: A pen\n
C2 How was your experience?: Awful\nWhat did you buy?: A pencil\n
As you can see, this is a table containing a survey and I'm trying to get only the answers from the column text. My first tought was to try to split the text, just like this:
df['text_splitted'] = df.text.str.split('\n')
And then I would do something like this:
df['final_text'] = df. text_splitted.str.split(':')
However, final_text is returning NaN. What just happened? Why is the new column returning null? Is there any way I can fix this (or a better way to do what I'm trying to do here)?