Pandas interview question: ARPU and ARPPU by channel
Problem
Shared data rulesBy acquisition channel, find the September 2026 ARPU and ARPPU of users who signed up in August 2026. Also find the payer share.
Formulas
payer_share = payers / cohort_users; a payer is a user with an order in Septemberarppu = revenue / payers,arpu = revenue / cohort_users, where revenue is the channel cohort’s September revenue
Example
users| user_id | signup_ts | acq_channel |
|---|---|---|
| 1 | 2026-08-03 12:15 | ads |
| 2 | 2026-08-12 21:40 | ads |
| 3 | 2026-08-20 10:10 | ads |
| 4 | 2026-08-25 15:30 | referral |
orders| order_id | user_id | created_at | status | amount_usd | Row note |
|---|---|---|---|---|---|
| 101 | 1 | 2026-09-02 13:00 | delivered | 36 | |
| 102 | 1 | 2026-09-15 19:20 | delivered | 24 | |
| 103 | 2 | 2026-08-28 14:45 | delivered | 50 | ← August — doesn’t count |
| 104 | 4 | 2026-09-10 11:30 | delivered | 40 |
- Order 103: August — doesn’t count
| acq_channel | cohort_users | payers | payer_share | arppu | arpu |
|---|---|---|---|---|---|
| ads | 3 | 1 | 0.3333 | 60 | 20 |
| referral | 1 | 1 | 1 | 40 | 40 |
In ads only user 1 pays: $36 + $24 = $60. ARPPU = 60 / 1 = $60, ARPU = 60 / 3 = $20.
Solve it free
Your code runs on real pandas in your browser. No sign-up needed.
Skills it tests
More interview questions
- Pandas: Rolling 7-day revenueEasy · Rolling aggregates
- Pandas: Cart-to-order conversionMedium · Funnels and conversion
- Pandas: Find the bugs in an average order value notebookEasy · Code review
- Pandas: Wide-to-long reshapingEasy · Pivot and unpivot
- Pandas: Detect dirty product names by groupEasy · Strings and text