Created
December 18, 2018 09:52
-
-
Save jonathanoheix/78386c817b96142b35e880536ae8a6bc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# plot sentiment distribution for positive and negative reviews | |
import seaborn as sns | |
for x in [0, 1]: | |
subset = reviews_df[reviews_df['is_bad_review'] == x] | |
# Draw the density plot | |
if x == 0: | |
label = "Good reviews" | |
else: | |
label = "Bad reviews" | |
sns.distplot(subset['compound'], hist = False, label = label) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment