I am reading from a csv file which contains the following data:
Create Date, Original Filesize, Number of Encodings
2016-01-27 16:27:10, 855583191, 1
2016-01-27 16:28:11, 854336, 1
2016-01-27 16:28:25, 854336, 1
2016-01-27 16:30:12, 9691559, 1
I want to count the number of records generated every two minutes in the table.
E.g. if we start from 2016-01-27 16:27:00
then from 2016-01-27 16:27:01
to 2016-01-27 16:29:00
, we have 2
records.
from 2016-01-27 16:29:01
to 2016-01-27 16:31:00
, we have 1
record and so on.
I am trying to use pandas as I want to do some data analysis on it later. Is there an easy way to do this with/without pandas?
Also, I use mysql
to export this data in the first place. If it is easier using sql
, that is also ok.