Introduction to cohort analysis

Customer Segmentation in Python

Karolis Urbonas

Head of Data Science, Amazon

About me

  • Head of Data Science at Amazon
  • 10+ years experience with analytics and ML
  • Worked in:
    • eCommerce
    • banking
    • consulting
    • finance
    • other industries
Customer Segmentation in Python

Prerequisites

  • pandas library

  • datetime objects

  • basic plotting with matplotlib or seaborn

  • basic knowledge of k-means clustering

Customer Segmentation in Python

What is cohort analysis?

  • Mutually exclusive segments - cohorts

  • Compare metrics across product lifecycle

  • Compare metrics across customer lifecycle

Customer Segmentation in Python

Types of cohorts

  • Time cohorts

  • Behavior cohorts

  • Size cohorts

Customer Segmentation in Python

Elements of cohort analysis

  • Pivot table

pivot_counts

Customer Segmentation in Python

Elements of cohort analysis

  • Pivot table

  • Assigned cohort in rows

cohort_counts_rows

Customer Segmentation in Python

Elements of cohort analysis

  • Pivot table

  • Assigned cohort in rows

  • Cohort Index in columns

cohort_counts_COLUMNS

Customer Segmentation in Python

Elements of cohort analysis

  • Pivot table

  • Assigned cohort in rows

  • Cohort Index in columns

  • Metrics in the table

cohort_counts_VALUES

Customer Segmentation in Python

Elements of cohort analysis

  • First cohort was acquired in December 2010

Customer Segmentation in Python

Elements of cohort analysis

  • First cohort was acquired in December 2010

  • Last cohort was acquired in December 2011

Customer Segmentation in Python

Explore the cohort table

Customer Segmentation in Python

Preparing Video For Download...