I have this code to get data from a dataset
df = get(datetime(2022, 4,19), 'validations')
df.head()
The result is:
card_id route_id timestamp
0 3941139920 34 2022-04-19 04:00:03
1 32111423 1305 2022-04-19 04:00:15
I need to aggregate the number of observations within one week from 19.4 to 26.4 per each route_id
i guess data from another day might be useful, so
card_id route_id timestamp
0 40629176 2040 2022-04-20 04:00:07
1 1961463432 4003 2022-04-20 04:00:11
so the final dataframe that I need:
route id trips
1 N
2 N
3 N