I have a pandas dataframe with 2 columns: Created'(%Y-%m-%d %H)
and Count
which is an integer.
It is counting the amount of "tickets" registered per hour.
The problem is that there are many hours in the day that there are not registered any tickets.
I would like to add these hours as new rows with a Count
of 0
. The dataframe looks like this:
Created Count
0 2020-10-26 10 11
1 2020-10-26 09 123
2 2020-10-26 08 36
3 2020-10-26 07 28
4 2020-10-26 06 7
But I would need it to add rows like this:
Created Count
enter code here
0 2020-10-26 10 11
1 2020-10-26 09 123
2 2020-10-26 08 36
3 2020-10-26 07 28
4 2020-10-26 06 7
1 2020-10-26 05. 0
3 2020-10-26 04. 0
Also adding that it needs to be able to update continuously as new dates are added to the original dataframe.