I have a pandas data frame that is structured something like this:
ID TEXT
1 Start of document
1 middle
1 end of document
2 start of document 2
2 middle
2 end of document 2
The raw data I got has repeating IDs which if you concatenate the text for each unique ID you get a resulting document. Some of these IDs repeat hundreds of times resulting in large quantities of text which I would like to boil down to one observation.
I'm not sure how to go about looping through and creating a new document. Also not sure if Pandas is the right data structure to store large quantities of text (these are transcribed call records--some of them 30 minute+ conversations). Would appreciate any pointers.