Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created October 1, 2020 14:34
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 amankharwal/00f2574495d23cd5e371403a386e9b38 to your computer and use it in GitHub Desktop.
Save amankharwal/00f2574495d23cd5e371403a386e9b38 to your computer and use it in GitHub Desktop.
reviews1 = trump_reviews[trump_reviews['Sentiment Polarity'] == 0.0000]
print(reviews1.shape)
cond1=trump_reviews['Sentiment Polarity'].isin(reviews1['Sentiment Polarity'])
trump_reviews.drop(trump_reviews[cond1].index, inplace = True)
print(trump_reviews.shape)
reviews2 = biden_reviews[biden_reviews['Sentiment Polarity'] == 0.0000]
print(reviews2.shape)
cond2=biden_reviews['Sentiment Polarity'].isin(reviews1['Sentiment Polarity'])
biden_reviews.drop(biden_reviews[cond2].index, inplace = True)
print(biden_reviews.shape)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment