【发布时间】:2021-11-26 02:44:04
【问题描述】:
#plot data
fig, ax = plt.subplots(figsize=(25,17))
plt.ylabel('No of tweets', fontsize=12)
#plt.xlim([1,20])
plt.title('Number of tweets', fontsize = 20)
data.sort_values(by = ['Year','Month'], ascending=[True,True]).groupby(['Month','Year']).count()['text'].plot(ax=ax)
plt.xlabel('Month-Year', fontsize=12)
I have attached the current output here
你能帮我理解我做错了什么吗?
【问题讨论】:
标签: pandas sorting plot group-by time-series