Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
sentiment analysis
nltk.download('stopwords')
stopword_list=stopwords.words('english')
stopword_list.remove('no')
stopword_list.remove('not')
df.review=df.review.apply(lambda x : " ".join(x for x in x.split() if x not in stopword_list))
df['review'][5]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment