I have a dataset of a unique ID and a sentence for each ID. I would like to break up the sentence by words and remove the stopwords to clean the data for further analysis.
Example of dataset:
ID Sentence
1 The quick brown fox
2 Feel free to be
Breaking up sentence:
ID Word
1 The
1 quick
1 brown
1 fox
2 Feel
2 free
2 to
2 be
Removing the stopwords:
ID Word
1 quick
1 brown
1 fox
2 Feel
2 free
I already have the IDs and sentences in a dataframe. What would be a suitable function to break up the texts including removing of punctuations after each word if any and then removing the rows with stopwords.