Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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])
Add Comment
Please, Sign In to add comment