text_html_output_1.png
from wordcloud import WordCloud

import matplotlib.pyplot as plt

import pandas as pd

data = pd.read_csv('../input/sentiment-analysis-for-financial-news/all-data.csv', names=['Sentiment', 'Tweet'], encoding='latin-1')

temp = data.groupby('Sentiment').count()['Tweet'].reset_index().sort_values(by='Tweet', ascending=False)
temp.style.background_gradient(cmap='Purples')

text = ' '.join([x for x in data.Tweet])
wordcloud = WordCloud(background_color='white').generate(text)
plt.axis('off')

data = data.drop(['list_mots'], axis=1)

data.head()