Skip to content

Instantly share code, notes, and snippets.

@liannewriting
Created September 6, 2020 17:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liannewriting/f3a143bde1a34dc70fc058e23e0f07dd to your computer and use it in GitHub Desktop.
Save liannewriting/f3a143bde1a34dc70fc058e23e0f07dd to your computer and use it in GitHub Desktop.
Twitter sentiment analysis python
df_starbucks['predicted_sentiment'] = pd.cut(df_starbucks['textblob_sentiment'],
bins=[-2, -0.05, 0.2857, 2],
labels=['negative', 'neutral', 'positive'],
right=False)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment