Rolling 7-Day Active Users

medium
Checkpoint challenge
Solve this to show you know the material and jump straight to Unit 12. Everything before it counts as cleared.

events has columns user_id and date (YYYY-MM-DD), possibly with many events per user per day. Implement wau(events, start, end) returning a DataFrame with columns date (strings) and active_7d: for each calendar day from start to end inclusive, the number of distinct users with an event in the 7 days ending that day (the day itself and the 6 before). Days with no events still appear.

#pandas#engagement#time-series2 visible + 1 hidden tests
solution.py · Python 3.13
Loading editor…
Run your code to see results. ⌘↵ to run · ⌘⇧↵ to submit
Rolling 7-Day Active Users · TechGradify