← Back![]()
Telecom X — customer churn analysis
ETL + EDA in Colab with a written final report: where and why customers leave
Problem
Clean the Telecom X data (7,267 customers) and explain which profiles and conditions concentrate churn, with recommendations to reduce it.
Data
TelecomX_Data.json from the Alura LATAM challenge (7,267 nested records: customer, phone, internet, account), downloaded via requests inside the notebook.
Methods
- Extraction with requests + json_normalize (21 flattened columns)
- Cleaning: Cargo_total to numeric (regex), 11 nulls filled with the median, 224 empty Churn values filled with the median, 0 duplicates, categorical encoding
- Derived Cuentas_diarias column (Cargo_mensual / 30.44)
- EDA: KDE histograms, boxplots with annotated quartiles, categorical distributions with percentages
- Churn analysis: donut, 21-variable correlation heatmap, churn by tenure bands, contract type, services, payment method and online billing
- Profile of 0–9-month customers (1,927) and written recommendations
- Final report written inside the notebook
Results
- Overall churn: 25.7% of 7,267 customers.
- Tenure 0–4 months: 53% churn; among the 1,927 customers with 0–9 months, 47.9% (923) leave.
- Month-to-month contracts are worst; annual 10.9% and biennial 2.8% churn. Electronic check payment: 43.8%. No internet service: 7.1%. Online billing: 32.5%.
- The numeric variable most associated with churn is tenure (correlation −0.34); followed by contract type (−0.39) and internet services.
Two honest caveats from the notebook itself: the 224 empty Churn values were filled with the median (imputing the binary target itself) and the «logistic regression curves» are seaborn regplot(logistic=True) visualisations, not a trained model.
Gallery
Tools
PythonpandasNumPymatplotlibseabornGoogle Colab