I’m querying an issue tracking system for a set of issues
The way the data comes back, I know when the issue was created and when it was changed, so I can iterate over all lifetime events for all issues.
I want to do some calculations like “how many open issues were there in each of the weeks from the start of the project until today”
To do this, I’m creating a DataFrame, initially populated with NaNs, with a multi-index on all the days the project has been live and all the issues found (some of which won’t have existed for each day)
lifetime_days = pd.date_range(start_date, datetime.date.today())
issue_keys = sorted(map(lambda s: s.key, issues))