Analysis of 7,000+ telecom customer records to understand what drives churn and to build a baseline model that predicts churn risk. The work combines exploratory data analysis and a logistic-regression classifier in Python, with an interactive Power BI dashboard for the business view.
The problem. Telecom companies lose revenue when customers leave. Understanding why customers churn — and flagging who is at risk — supports proactive retention.
What this project does:
- Exploratory Data Analysis (EDA) to surface churn patterns across contract, service, payment, charges, and tenure
- A logistic-regression baseline model for binary churn classification
- A Power BI dashboard summarising churn KPIs and driver analysis
- Model accuracy: 78.7% on a held-out 20% test set (logistic regression)
- Churn class — precision 0.62, recall 0.52, F1 0.56; retained class — precision 0.83, recall 0.89, F1 0.86
- EDA shows churn concentrated among month-to-month contracts, fiber-optic internet, electronic-check payments, higher monthly charges, and shorter tenure
(Metrics come directly from the classification report in the notebook. See Limitations for why recall on the churn class is the main area for improvement.)
| Attribute | Details |
|---|---|
| Source | IBM Telco Customer Churn (Kaggle) |
| Size | 7,043 records (7,032 after cleaning) |
| Features | 20 features used (demographics, services, contract, billing) |
| Target | Churn (Yes / No — binary) |
| Class balance | ~26% churn, ~74% retained |
Data cleaning
- Dropped
customerID(identifier, not predictive) - Converted
TotalChargesto numeric and dropped the 11 blank rows (~0.15% of data)
Feature engineering
- One-hot encoded categorical variables with
drop_first=Trueto avoid multicollinearity - Standardised numerical features with
StandardScaler
Modelling
- 80/20 train–test split (
random_state=42) - Logistic regression (
max_iter=5000) as an interpretable baseline - Evaluated with accuracy and a per-class classification report
Telco_Customer_Churn/
├── data/
│ └── Telco-Customer-Churn.csv # Raw dataset
│
├── notebooks/
│ └── telco_churn_analysis.ipynb # EDA + modelling
│
├── dashboards/
│ ├── Telco_Churn_Dashboard.pbix # Power BI dashboard
│ └── screenshots/
│ ├── page1.png
│ └── page2.png
│
├── requirements.txt
├── LICENSE
└── README.md
# 1. Clone
git clone https://github.com/Harshitharam25/Telco_Customer_Churn.git
cd Telco_Customer_Churn
# 2. (Optional) virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# 3. Install dependencies
pip install -r requirements.txt
# 4. Run the notebook
jupyter notebook notebooks/telco_churn_analysis.ipynbThe dataset is already included in data/. The original source is linked above.
The Power BI dashboard (dashboards/Telco_Churn_Dashboard.pbix) covers churn KPIs and driver analysis, with filters for segment-level exploration.
| Finding | Recommendation |
|---|---|
| Month-to-month contracts churn most | Incentivise 1–2 year contracts |
| Fiber-optic customers churn heavily | Review fiber service quality and pricing |
| Electronic-check payers churn more | Promote auto-pay / card options |
| Short-tenure customers churn most | Strengthen early-onboarding experience |
| Higher monthly charges track with churn | Revisit pricing tiers |
This is a baseline project, and the following are known limitations:
- Single model (logistic regression) — no ensemble comparison yet
- No hyperparameter tuning — default settings
- Single train–test split — no cross-validation
- Class imbalance (26/74) not explicitly handled, which lowers recall on the churn class
Planned improvements:
- Compare tree-based models (Random Forest, XGBoost)
- Add cross-validation and hyperparameter tuning (GridSearchCV)
- Address class imbalance (class weights / SMOTE) to raise churn recall
- Add SHAP for feature-importance interpretation
- Add ROC-AUC to the evaluation
pandas · NumPy · scikit-learn · seaborn · matplotlib · Jupyter · Power BI
MIT License — see LICENSE.
Harshitha Ram
- GitHub: @Harshitharam25
- LinkedIn:@harshitharam25
- Email: harshitharam5623@gmail.com
AI tools assisted with documentation wording and formatting. The data analysis, modelling decisions, feature engineering, and insights are my own work.

