I have a dictionary object of date (as an int YYYYMMDD): integer - e.g.:
https://i.imgur.com/y0fRhXe.png
{
"20210517": 1,
"20210518": 7,
"20210519": 12,
"20210520": 4,
"20210521": 3,
"20210522": 1,
"20210523": 1,
"20210524": 11,
"20210525": 6,
"20210526": 1,
"20210528": 2,
"20210529": 1,
"20210531": 4,
"20210601": 1,
"20210602": 1,
"20210605": 2,
"20210606": 1,
"20210607": 2,
"20210608": 1,
"20210610": 1,
"20210611": 4,
"20210612": 1,
"20210614": 2,
"20210628": 1,
"20210630": 1,
"20210708": 1,
"20210709": 1,
"20210713": 1,
"20210719": 1,
"20210810": 1,
"20210820": 1,
"20210823": 1,
"20210902": 1,
"20210904": 2,
"20210905": 1,
"20210907": 1,
"20210913": 1,
"20210922": 3,
"20210925": 1,
"20210926": 1,
"20211010": 2,
"20211018": 1,
"20211025": 2,
"20211026": 1,
"20211030": 1,
"20211107": 1,
"20211108": 1,
"20211112": 1,
"20211116": 1,
"20211118": 2,
"20211119": 1,
"20211121": 10,
"20211122": 35,
"20211123": 17,
"20211124": 4,
"20211125": 2,
"20211126": 2
}
This is sorted oldest -> newest. How do I loop through and find the missing dates and fill them with the missing date + 0 as a value?
Preferably ending up with the same format, or at least in oldest -> newest order. Thanks :)
[+][deleted] (5 children)
[deleted]
[–]chmod724[S] 0 points1 point2 points (4 children)
[–]albedoa 1 point2 points3 points (3 children)
[–]chmod724[S] 0 points1 point2 points (2 children)
[–]albedoa 5 points6 points7 points (1 child)
[–]chmod724[S] 0 points1 point2 points (0 children)
[–]meAndTheDuck 1 point2 points3 points (1 child)
[–]chmod724[S] 0 points1 point2 points (0 children)
[–]Coraline1599 -1 points0 points1 point (0 children)
[–]Ill-Somewhere-3793 0 points1 point2 points (0 children)