A telecom company is losing customers and wants to understand who is leaving, why they are leaving, and which customers are at highest risk. This project performs end-to-end data analysis using Python and SQL to identify churn drivers and provide actionable business recommendations.
Business Problem: 1 in 4 customers is churning — costing the company millions in lost revenue. Which customers are most at risk and why?
Customer_Churn_Project/
│
├── Customer_Churn_Analysis.ipynb # Main analysis notebook
├── sql_analysis_results.xlsx # SQL query results (5 sheets)
├── WA_Fn-UseC_-Telco-Customer-Churn.csv # Raw dataset
│
├── charts/
│ ├── chart1_churn_rate.png
│ ├── chart2_contract_churn.png
│ ├── chart3_monthly_charges.png
│ ├── chart4_tenure.png
│ ├── chart5_internet_service.png
│ └── chart6_heatmap.png
│
└── README.md
| Tool | Purpose |
|---|---|
| Python 3 | Core programming language |
| Pandas | Data cleaning & manipulation |
| Seaborn & Matplotlib | Data visualization |
| SQLite (via Python) | SQL-based business analysis |
| Jupyter Notebook | Development environment |
- Source: Telco Customer Churn — Kaggle
- Size: 7,032 customers | 20 features
- Features include: Contract type, tenure, monthly charges, internet service, payment method, and more
Phase 1: Data Loading & Exploration
↓
Phase 2: Data Cleaning
(Fixed TotalCharges dtype, removed 11 null rows, encoded target)
↓
Phase 3: Exploratory Data Analysis (EDA)
(6 business questions answered with visualizations)
↓
Phase 4: SQL Analysis
(5 SQL queries using SQLite — churn by segment, tenure buckets, high-risk identification)
↓
Phase 5: Business Insights & Recommendations
- 26.58% of customers churned (1,869 out of 7,032)
- 1 in 4 customers is leaving the company
| Contract | Churn Rate |
|---|---|
| Month-to-month | 42.71% |
| One year | 11.28% |
| Two year | 2.85% |
→ Customers on month-to-month contracts churn 15x more than two-year contract customers
| Internet Service | Churn Rate |
|---|---|
| Fiber optic | 41.89% |
| DSL | 19.00% |
| No internet | 7.43% |
→ Possible service quality or pricing dissatisfaction among Fiber optic users
| Tenure Group | Churn Rate |
|---|---|
| 0–12 months (New) | 47.68% |
| 13–24 months | 28.71% |
| 25–48 months | 20.39% |
| 49+ months (Loyal) | 9.51% |
→ The first year is critical — nearly half of new customers leave
- Month-to-month + Fiber optic + Paperless billing = 56.96% churn rate
- This segment has 1,689 customers — the top priority for retention campaigns
| # | Recommendation | Target |
|---|---|---|
| 1 | Offer discounts to move customers to yearly contracts | Month-to-month customers |
| 2 | Create a 90-day onboarding & engagement program | New customers (0–12 months) |
| 3 | Investigate Fiber optic service quality and pricing | Fiber optic subscribers |
| 4 | Launch retention campaign targeting high-risk segment | 1,689 high-risk customers |
- Clone this repository
git clone https://github.com/Devendra0602/customer-churn-analysis.git
cd customer-churn-analysis- Install required libraries
pip install pandas numpy matplotlib seaborn openpyxl- Open the notebook
jupyter notebook Customer_Churn_Analysis.ipynb- Run all cells from top to bottom
Devendra
- 📧 [patil.devendra062@gmail.com]
- 💼 [https://www.linkedin.com/in/patil-devendra2701/]
- 🐙 [https://github.com/Devendra0602]
"Analyzed Telco churn dataset of 7,032 customers using Python & SQL — identified Month-to-month + Fiber optic segment with 56.96% churn rate and recommended 4 targeted retention strategies"





