Dataset Viewer

The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.

🏦 Bank Customer Churn Analysis

Python Pandas Scikit-Learn Status

πŸŽ₯ Project Walkthrough (Video)

Click the image below to watch the full explanation of the data analysis:

Watch the Video

In this video: I explain the data cleaning process, outlier handling, and the key insights about customer churn.


πŸ“Œ Project Overview

This project is an end-to-end data science analysis of a bank customer dataset. The primary objective is to investigate the factors contributing to customer attrition (churn) and to identify patterns that distinguish customers who leave from those who stay.

Context: This work was completed as Assignment 1 for the "Introduction to Data Science" course.


πŸ“‚ 1. The Dataset

Dataset: Bank Customer Churn (Kaggle)
Target Variable: Exited (1 = Churned, 0 = Stayed)

Metric Details
Source Churn_Modelling.csv
Size 10,000 Rows
Key Features CreditScore, Geography, Gender, Age, Tenure, Balance, NumOfProducts, EstimatedSalary

🧹 2. Data Cleaning & Preprocessing

A rigorous cleaning process was applied to ensure data quality. Below are the critical decisions made during this phase:

  • ❌ Dropping Irrelevants: Columns RowNumber, CustomerId, and Surname were removed as they are unique identifiers with no predictive power.
  • βœ… Missing Values: Confirmed 0 null values in the dataset.
  • βœ… Duplicates: Confirmed 0 duplicate rows.
  • ⚠️ Outlier Strategy:
    • Decision: Outliers were KEPT.
    • Justification: In churn analysis, extreme values (e.g., older age, high balance) are often the most informative. Removing a 90-year-old customer would result in losing valid behavioral data for that demographic.
  • βš–οΈ Feature Scaling: Identified significant scale differences (e.g., Balance vs. Age). Applied StandardScaler to normalize features for model performance.

πŸ“Š 3. Exploratory Data Analysis (EDA)

We focused on two main research questions to derive business insights.

🌍 Q1: Does geography impact the churn rate?

Investigation: Analyzing the proportion of churned customers across France, Germany, and Spain.

Churn Rate by Geography

πŸ’‘ Insight: Geography is a strong predictor. While France has the highest volume of customers, Germany exhibits a significantly higher churn rate. This suggests potential issues with local competition, customer service, or market fit specifically in the German region.

πŸ‘΄ Q2: What is the relationship between Age and Churn?

Investigation: Using Kernel Density Estimation (KDE) to compare age distributions of retained vs. churned customers.

Age Distribution by Churn Status

πŸ’‘ Insight: Age is a critical factor.

  • Stayed (0): Peak distribution around 30-40 years old.
  • Churned (1): Distinct peak around 45-55 years old.
  • Action Item: The bank is losing its mature, middle-aged customer base. Retention campaigns should specifically target the 45-60 age demographic.

πŸ› οΈ Tech Stack

  • Language: Python
  • Libraries: Pandas, Matplotlib, Seaborn, Scikit-learn
  • Environment: Jupyter Notebook
Downloads last month
33