Python 如何汇总状态更改的大日期

Python 如何汇总状态更改的大日期,python,mysql,pandas,Python,Mysql,Pandas,我的问题是,从记录每台计算机状态变化的数据中,计算每次具有特定状态的计算机的数量 我有以下csv文件,它记录了计算机状态更改的时间 machine_id, status_id, time 1,10,2010-05-01 00:00:02 # the status of the machine 1 is changed to 10 at 05-01 00:00:02 2,3,2010-05-01 00:00:04 ... 机器总数超过50000台,记录规模约为500万台。状态的数量大约是10 我

我的问题是,从记录每台计算机状态变化的数据中,计算每次具有特定状态的计算机的数量

我有以下csv文件,它记录了计算机状态更改的时间

machine_id, status_id, time
1,10,2010-05-01 00:00:02 # the status of the machine 1 is changed to 10 at 05-01 00:00:02
2,3,2010-05-01 00:00:04
...
机器总数超过50000台,记录规模约为500万台。状态的数量大约是10

我需要得到每个时间段内处于每个状态的计算机的数量。例如,结果文件如下所示:

time,status_id,number_of_computers
2010-05-01 00:00:00,1,12 # the number of computer whose status is 1 is 12 from 05-01 00:00:00 to 05-01 00:15:00
2010-05-01 00:00:00,2,23
...
2010-05-01 00:15:00,1,21
2010-05-01 00:15:00,2,32
...
我通常使用python pandas来完成这类任务,但可能数据太大了

哪种工具适用于此类任务?例如,python、MySQL或Java?如果您使用推荐的工具添加示例代码来完成此任务,我将不胜感激