July 2017
Beginner to intermediate
312 pages
7h 27m
English
In order to get insightful information we'll calculate the sentiment for the most frequent entities related to football clubs. We take the three most mentioned clubs and check the mean sentiment for each of them using the np.mean() function from numpy as follows:
subset = dataset[dataset['tweet'].str.contains('Liverpool')] avg_sentiment = np.mean(subset['sentiment'])
We obtain the following results illustrated by some random verbatim:
Liverpool 0.1166: Milner focused on Liverpool results #SSFootball via @SuperSportTV https://t.co/CIthkFY5Qs. Juninho says he is delighted Liverpool forward Philippe Coutinho replaced him as the top-scoring Brazilian in the Premier League. African striker on his love for ...
Read now
Unlock full access