Cohort analysis shows how groups behave over their lifetime, which overall totals cannot.
It exists because a business mixes customers of very different ages at every moment.
Without it, growth from new users can hide worsening behaviour, or the other way round.
A cohort is usually defined by when users started, such as all sign-ups in March.
Other cohorts group users by first product, marketing channel or region.
The standard view is a triangle-shaped table, with cohorts as rows and months since start as columns.
Each cell holds a measure such as the share still active, or revenue per user.
Reading along a row shows how one cohort ages.
Reading down a column compares cohorts at the same age, which shows whether things are improving.
Reading diagonally shows the effect of a calendar event, such as an outage hitting every cohort in the same month.
Building one in pandas needs each user's start date and each activity date, grouped by both.
Small cohorts give noisy rates, so very young or small cohorts need caution.
Retention curves, one line per cohort, are an easy-to-read chart of the same table.
In practice, cohort tables are a standard view for subscription businesses, apps and marketplaces.
The usual mistake is comparing cohorts at different ages, such as a 3 month old cohort against a 12 month old one.