I have a dataframe with two columns: doc_id, text
I have tokenised my text but I want to create a new row for each doc_id, token.
What is the most efficient way for me to do this?
As-is:
doc_id text
1 "cat mat home"
2 "dog mat table"
To-be:
doc_id text
1 cat
1 mat
1 home
2 dog
2 mat
2 table