I have a python dataframe (df1
) which has a column time. I converted the column into a datetime series using pd.to_datetime(df1['time'])
. Now I get a column like this:
2016-08-24 00:00:00 2016-08-13 00:00:00
2016-08-24 00:00:00 2016-08-13 00:00:00
2016-08-24 00:00:00 2016-08-13 00:00:00
2016-08-24 00:00:00 2016-08-13 00:00:00
2016-08-24 00:00:01 2016-08-13 00:00:01
2016-08-24 00:00:01 2016-08-13 00:00:01
2016-08-24 00:00:02 2016-08-13 00:00:02
2016-08-24 00:00:02 2016-08-13 00:00:02
2016-08-24 00:00:02 2016-08-13 00:00:02
2016-08-24 00:00:02 2016-08-13 00:00:02
2016-08-24 00:00:02 2016-08-13 00:00:02
2016-08-24 00:00:02 2016-08-13 00:00:02
2016-08-24 00:00:02 2016-08-13 00:00:02
2016-08-24 00:00:02 2016-08-13 00:00:02
2016-08-24 00:00:02 2016-08-13 00:00:02
....
2016-08-24 23:59:59 2016-08-13 00:00:02
Essentially, I want the first column to be grouped by the hour, so that I can see how many entries are there in 1 hour. Any help will be great.