July 2017
Beginner to intermediate
312 pages
7h 27m
English
Secondly, it is interesting to know the periods when users comment most actively on the video.
We use a similar approach to plot the number of comments on a chart:
df['sentiment'].resample('M').count().plot()
plt.axhline(0, color='k', lw = 2)
plt.xlabel('Date')
plt.ylabel('Number of comments')
plt.show()

We can see that the majority of comments were published within the first few days after publication. It means that this is the most crucial period for a brand to capture the attention of its target audience.
Then, we can check what happens after this period by analyzing comments from the second week onwards:
dx = df[df.index ...
Read now
Unlock full access