I have a data frame that looks like this:
counts month
login_time
1970-03-14 17:45:52 3 Mar
1970-01-09 01:31:25 3 Jan
1970-04-12 04:03:15 3 Apr
1970-02-24 23:09:57 3 Feb
1970-04-04 01:17:40 3 Apr
1970-02-12 11:16:53 3 Feb
1970-03-17 01:01:39 3 Mar
1970-01-06 21:45:52 3 Jan
1970-03-29 03:24:57 3 Mar
1970-04-03 14:42:38 2 Apr
I would like to aggregate these login counts by 15 min intervals and then plot the results.
I tried the following:
df.groupby('login_time').resample('15min').count()
but the way it resamples doesn't seem correct
counts month
login_time login_time
1970-01-01 20:12:16 1970-01-01 20:00:00 1 1
1970-01-01 20:13:18 1970-01-01 20:00:00 1 1
1970-01-01 20:16:10 1970-01-01 20:15:00 1 1
1970-01-01 20:16:36 1970-01-01 20:15:00 1 1
1970-01-01 20:16:37 1970-01-01 20:15:00 1 1
1970-01-01 20:21:41 1970-01-01 20:15:00 1 1
1970-01-01 20:26:05 1970-01-01 20:15:00 1 1
1970-01-01 20:26:21 1970-01-01 20:15:00 1 1
1970-01-01 20:31:03 1970-01-01 20:30:00 1 1
1970-01-01 20:34:46 1970-01-01 20:30:00 1 1
Thank you!