Preview mode. Browse milestones and edit starter code here. Sign in to run and submit.
0/8EDA
Python
intermediate~6h8 milestones
The problem
A telecom company is losing subscribers faster than they can acquire new ones. The retention team needs a churn prediction system to identify at-risk customers before they cancel, so outreach can happen while there is still time to save the relationship.
Your task · Exploratory Data Analysis
Understand the dataset shape, churn rate, and data quality issues.
Implement explore_churn(train_df) that returns a dict with:
row_count: number of training rows
churn_rate: fraction of customers who churned (0-1)
missing_total_charges: count of NaN values in total_charges
avg_tenure: mean tenure_months
positive_class_pct: churn_rate as a percentage
Constraints
▪16% positive class - treat imbalance explicitly
▪4% of total_charges values are missing - impute from other columns
▪No external data downloads - train.csv is your only training data
▪Hidden test set is evaluated server-side - you cannot overfit to it
▪Batch inference must complete within 3 seconds for 1,000 customers
Graded on
ROC-AUC >= 0.72 on hidden test set
F1 >= 0.38 (better than majority-class baseline on minority class)
Precision >= 0.22 with recall >= 0.75 for retention targeting