0

I have got this example code.

from gensim.parsing.preprocessing import remove_stopwords

text = "Nick likes to play football, however he is not too fond of tennis."
filtered_sentence = remove_stopwords(text)

print(filtered_sentence)

However, I'm not familiar with pandas and loop. Say, I have

data = {'Text':['I like it.', 'He is happy.', 'This is apple.', 'It is great.']}
df = pandas.DataFrame(data)

How can I use loop (I guess it is loop) to remove stop words in Text with Gensim remove_stopwords and put the results in data['text_without_stopwords']? Thanks!

MC2020
  • 67
  • 6

0 Answers0