1. Learn
  2. /
  3. Courses
  4. /
  5. Customer Analytics and A/B Testing in Python

Exercise

Calculating KPIs

You're now going to take what you've learned and work through calculating a KPI yourself. Specifically, you'll calculate the average amount paid per purchase within a user's first 28 days using the purchase_data DataFrame from before.

This KPI can provide a sense of the popularity of different in-app purchase price points to users within their first month.

Instructions 1/4

undefined XP
    1
    2
    3
    4

Subtract timedelta(days=28) from current_date to find the last date that we will count purchases from. The current_date variable has already been defined.