我正在处理数据集
https://pastebin.com/PEFUspiU
我必须对它进行分组并计算在特定时间段内有多少个请求,然后就可以很容易地绘制出时间与请求数的图表。
举个例子
**timestamp - number of request**
21-06-2016 09:00:00 - 2
21-06-2016 10:00:00 - 1
21-06-2016 11:00:00 - 5
我怎么能算出这个数?在
谢谢
我尝试使用data['timestamp'].value_counts()
但出现错误:
^{pr2}$
Tags:
如果您想每小时对它们进行计数,则可以对它们进行分组,然后进行计数,为此,请确保您的时间戳是pandas datetime:
正在读取文件:
相关问题 更多 >
编程相关推荐