Created
June 30, 2018 12:53
-
-
Save himlohiya/44738084d7adb3bafd6c4f41ec40ae1c 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
| pos_idx = df[(df.news_category=='technology') & (df.sentiment_score == 6)].index[0] | |
| neg_idx = df[(df.news_category=='technology') & (df.sentiment_score == -15)].index[0] | |
| print('Most Negative Tech News Article:', news_df.iloc[neg_idx][['news_article']][0]) | |
| print() | |
| print('Most Positive Tech News Article:', news_df.iloc[pos_idx][['news_article']][0]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment