I have a dataframe with date, value, and isoweek fields like this:
date | value | isoweek
-----------------------------
2018-04-01 | 5 | 2018-13
2018-04-10 | 10 | 2018-15
2018-05-01 | 10 | 2018-18
where isoweek is the year-week of the corresponding date. my goal is to iterate over the isoweeks, finding the isoweeks that dont exist in the data and insert a row into the dataframe with 0 as the value.
The expected output would look like this:
date | value | isoweek
-----------------------------
2018-04-01 | 5 | 2018-13
NaN | 0 | 2018-14
2018-04-10 | 10 | 2018-15
NaN | 0 | 2018-16
NaN | 0 | 2018-17
2018-05-01 | 10 | 2018-18
How can I iterate over the original dataframe, and find all the missing isoweeks in the data?