i am trying to analyze a dataset with twitts. i have sentiment and country as columns, as well as the date of the twitt.
i would like to show the average sentiment per date for two different countries and i can't find the way around it.
how do i plot the average sentiment per day? and hoy do i show just the twitts for "united kingom" for example?
the image attached was done with the following code:
fig, ax = plt.subplots(2,1, sharey=True)
ax[0].plot(dff['just_date'].tolist(), dff['sentiment'], marker=".", linestyle="None", color="r")
ax[0].set_xlabel("Time")
ax[0].set_ylabel("Sentiment")
ax[0].set_title("Sentiment vs. Time")
ax[1].plot(dff['just_date'].tolist(), dff['sentiment'], marker=".", linestyle="None", color="b")
ax[1].set_xlabel("Time")
ax[1].set_ylabel("Sentiment")
ax[1].set_title("Sentiment vs. Time")
plt.show()
thanks!
i would like to show the average sentiment per date for two different countries and i can't find the way around it.