Skip to content

Instantly share code, notes, and snippets.

Created Oct 12, 2021
What would you like to do?'vader_lexicon')
sentiments = SentimentIntensityAnalyzer()
data["Positive"] = [sentiments.polarity_scores(i)["pos"] for i in data["text"]]
data["Negative"] = [sentiments.polarity_scores(i)["neg"] for i in data["text"]]
data["Neutral"] = [sentiments.polarity_scores(i)["neu"] for i in data["text"]]
data = data[["text", "Positive", "Negative", "Neutral"]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment