

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 5
click for more info
Not enough gems
Cost: 6 gems
1: Event Data
incomplete
2: Event Structure
incomplete
3: Event Counting
incomplete
4: Resample
incomplete
5: Resample Aggregations
incomplete
6: Active Users
incomplete
7: Time Patterns
incomplete
8: Funnel Metrics
incomplete
9: Conversion Rates
incomplete
10: Funnel Drop-Offs
incomplete
11: Ordered Funnels
incomplete
12: Cohorts
incomplete
13: Cohort Retention
incomplete
14: Rolling Metrics
incomplete
15: Growth Rates
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
One of the most common visualizations for cohorts is their retention rate (percentage) by cohort. It's often drawn like this, with nice colors to highlight the decay:
To calculate it, divide each row by the cohort's initial size (month 0):
cohort_sizes = cohort_table[0]
retention = cohort_table.div(cohort_sizes, axis=0)
print(retention)
Which prints something like this:
0 1 2
cohort
2024-01 1.0 0.67 0.67
2024-02 1.0 0.50 1.00
2024-03 1.0 1.00 NaN
Newer cohorts often have fewer columns filled in because not enough time has passed. Don't compare incomplete periods.
Every cohort starts at 1.0 (100%) in month 0, because you're dividing the cohort's starting size by itself. That's the baseline. The interesting signal is how fast each row decays from there: a row that's still near 1.0 several months out is a sticky cohort, while one that drops to 0.10 has a retention problem.