0
我在推特字发病率的数据帧,与第一鸣叫的日期作为索引中列出:熊猫轨道字发病率日期
Kill Counts Killing Counts Murder Count Violence Count
2015-07-01 0 0 0 0
2015-07-01 0 0 0 0
2015-07-02 0 0 0 0
2015-07-02 0 0 0 0
2015-07-06 0 0 0 0
我想压缩所有重复的日子变成一条线,然后每天绘制这些词的发生率。
df4 =df3.groupby([df3.index])
返回
<pandas.core.groupby.DataFrameGroupBy object at 0x180ba9510>
但输出似乎是每天无用图,其没有少具有若干X轴每天蜱。我是matlab新手,我如何按日期分组?
我每天的tweets数量的图表一起工作:
df.groupby([df.index]).count().plot(kind='bar')
但
df4 =df3.groupby([df3.index.date])
回报
AttributeError: 'Index' object has no attribute 'date'