Skip to content

About

Customer churn analysis using Python, SQL, and Tableau to identify churn drivers and improve customer retention.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

📉 Telecom Customer Churn Analysis

A churn analysis project built on subscription data — cleaning three raw source tables, joining them into one customer view, and pulling out the numbers that actually explain who's leaving and why.

##Pipeline: Raw data (Excel/CSV) → Python (pandas) → analysis + visuals.

🎯 Business Problem

Customer churn is one of the biggest challenges for subscription-based businesses.

The objective of this project is to answer important business questions such as:

  • Which customers are most likely to churn?

  • Which services contribute to higher churn?

  • Does customer support impact retention?

  • How do subscription plans influence churn?

  • Which customer segments should be targeted for retention campaigns?

    📁 Repository Structure

Telecom-Customer-Churn-Analysis/ │ ├── Dashboard/ │ └── Telecom_Customer_Churn_Dashboard.twb │ ├── Data/ │ ├── customer.csv │ ├── subscription.csv │ ├── support.csv │ └── Excel sheet.xlsx │ ├── Images/ │ └── Dashboard.png │ ├── Python/ │ └── Churn_Analysis.ipynb │ ├── SQL/ │ └── telecom_churn_analysis.sql │ ├── README.md └── .gitignore

📂 Dataset

Three raw tables (customers.csv, subscription.csv, support.csv — provided both as individual CSVs and as one combined customer_churn_data_raw_large.xlsx):

-Customer — customer ID, name, country, state, gender, DOB, interests, pincode -Subscription — subscription/renewal/cancellation dates, plan type, contract type, monthly charges, CLTV, churn score -Support — complaint date, escalation flag, CSAT score, comments

##Data cleaning

-Renamed name → customer_name for clarity -Dropped unused columns (interests, pincode from customer; col_1, comment from support) -Converted all date fields (DOB, subscription start/renewal/cancellation, complaint date) from text to proper date types -Standardized inconsistent gender labels (Men/Women → Male/Female) -Filled missing country values using each customer's state as a lookup key — recovered all 120 missing values with zero data loss -Deduplicated the support table (customers with multiple complaints) before merging, so the join doesn't inflate customer counts

##Feature engineering

-churn_flag — 1 if a cancellation date exists, else 0 -complaint_count — total complaints per customer, from the raw support log -age — calculated from DOB -average_tenure — days active, using cancellation date if churned, otherwise today's date -churn_risk — bucketed from churn score into low / med / high -Encoded escalations (Y/N → 1/0) for correlation analysis

📊 Analysis

-Overall churn rate & retention rate

-Churn rate by plan type, subscription type, and state

-ARPU (average revenue per user)

-Revenue at risk — total monthly revenue tied to already-churned customers

-Escalation rate, and correlation between escalations and churn

-Customer age and average tenure

-Visuals (matplotlib)

-Monthly churn trend (time series)

-Churn rate by plan type

-Churn rate by state

📈 Key Insights

-Churn rate: 22.63% against a retention rate of 77.37% — roughly 1 in 5 customers is leaving

-Revenue at risk: ₹11,005.23 in monthly charges tied to customers who've already churned — this is recurring revenue already lost, not a forecast

-ARPU(average revenue per user): ₹23.61 per user — useful as the baseline for what each churned customer is actually worth

-Basic plan churns the most (24.21%), Standard the least (20.73%) — the cheapest plan isn't the "safest" one

-Escalations don't explain churn — correlation between support escalations and churn is effectively 0 (0.02), so "customers are leaving because support failed them"

-Average tenure is ~1,618 days (~4.4 years) before cancellation, so churn isn't an early-days problem — customers are sticking around a long time before leaving

💡 Business Recommendations

  • Encourage customers to upgrade to long-term subscription plans.
  • Improve customer support response times and issue resolution.
  • Launch proactive retention campaigns for high-risk customers.
  • Monitor customers with declining service usage.
  • Use targeted offers to retain valuable customers before renewal.

Folder structure ├── data/

│ ├── db_customer_.csv

│ ├── db_subscription_.csv

│ ├── db_support_.csv

│ └── customer_churn_data_raw_large.xlsx

├── notebook/

│ └── churn_analysis_python.ipynb

└── README.md

-Running it Load the three source files (customers.csv, subscription.csv, support.csv) Run churn_analysis_python.ipynb top to bottom — cleaning, feature engineering, analysis, and visuals all happen in sequence Merged output is exported as exported_churn_data.csv for downstream use

📬 Contact

Punit Kumar

GitHub: https://github.com/punitkumar-dtu

⭐ If you found this project useful, consider giving the repository a star.

About

Customer churn analysis using Python, SQL, and Tableau to identify churn drivers and improve customer retention.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages