Last active
May 28, 2020 21:17
-
-
Save kurasaiteja/cf57eb0cf20745ab42776b0765cc52c2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
# Average of python column by day | |
mean_python = df_tweet['python'].resample('1 min').mean() | |
# Average of js column by day | |
mean_js = df_tweet['js'].resample('1 min').mean() | |
# Plot mean python/js by day | |
plt.plot(mean_python.index.minute, mean_python, color = 'green') | |
plt.plot(mean_js.index.minute, mean_js, color = 'blue') | |
# Add labels and show | |
plt.xlabel('Minute'); plt.ylabel('Frequency') | |
plt.title('Language mentions over time') | |
plt.legend(('#python', '#js')) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment