I have a dataset of some criminal attacks that is structured in this way:
DATE ------ EVENT ----
01/02/2019 ---- "x has been attacked" -----
01/02/2019 ---- "y has been attacked" ----
01/02/2019 ---- "" ----
03/02/2019 ---- "..." ----
I would like to know if there is an efficient way in Python to transform this dataset in a count time series.
That is, a time series that:
- has no jumps between the dates
- has in the second column the number of events for each date (including the 0)
Smething like that
DATE ------ NUMBER OF EVENTS ----
01/02/2019 ---- 3 ----
02/02/2019 ---- 0 ----
03/02/2019 ---- 1 ---- ...
Thanks a lot.