Socialify

Folder ..

Viewing predictor.py
9 lines (6 loc) • 198.0 B

1
2
3
4
5
6
7
8
import pandas as pd
import matplotlib.pyplot as plt

tweets = pd.read_csv('tweets.csv')

# Plot the number of tweets by sentiment
tweets.groupby('sentiment').count()['tweet'].plot.bar()
plt.show()