<!--
    Customer Churn Dataset - README
    ================================
    Provided by: RSK World
    Website: https://rskworld.in/
    Email: help@rskworld.in
    Phone: +91 93305 39277
    Contact Page: https://rskworld.in/contact.php
-->

# Customer Churn Dataset

Comprehensive customer churn dataset with demographic, usage, and billing information for predicting customer retention and churn analysis.

## Description

This dataset contains customer information including demographics, account details, usage patterns, billing history, and churn status. Perfect for building classification models to predict customer churn, analyzing retention factors, and understanding customer behavior patterns.

## Features

- **Demographic and account information** - Age, gender, location, account type
- **Usage patterns and billing data** - Monthly usage, billing amount, payment method
- **Churn labels and timestamps** - Binary churn status with timestamps
- **Multiple feature categories** - 15+ features across different categories
- **Ready for ML model training** - Preprocessed and structured data

## Dataset Structure

The dataset includes the following columns:

- `CustomerID` - Unique customer identifier
- `Gender` - Customer gender (Male/Female)
- `Age` - Customer age
- `Tenure` - Number of months as customer
- `City` - Customer city
- `AccountType` - Type of account (Basic/Premium/Enterprise)
- `MonthlyUsage` - Monthly service usage
- `BillingAmount` - Monthly billing amount
- `PaymentMethod` - Payment method (Credit Card/Bank Transfer/Other)
- `ContractLength` - Contract length in months
- `SupportCalls` - Number of support calls
- `LastLogin` - Last login date
- `Churn` - Churn status (Yes/No)
- `ChurnDate` - Date when customer churned (if applicable)
- Additional feature columns...

## Technologies Used

- **CSV** - Comma-separated values format
- **Excel** - Microsoft Excel compatible format
- **Pandas** - Python data analysis library
- **NumPy** - Numerical computing library

## Difficulty Level

**Beginner** - Suitable for beginners learning data science and machine learning.

## Installation & Usage

### Prerequisites

```bash
pip install pandas numpy matplotlib seaborn scikit-learn
```

### Loading the Dataset

```python
import pandas as pd
import numpy as np

# Load the dataset
df = pd.read_csv('data/customer_churn.csv')

# Display basic information
print(df.info())
print(df.head())
print(df.describe())
```

### Basic Analysis

```python
# Check for missing values
print(df.isnull().sum())

# Churn distribution
print(df['Churn'].value_counts())

# Visualize churn rate
import matplotlib.pyplot as plt
df['Churn'].value_counts().plot(kind='bar')
plt.title('Churn Distribution')
plt.show()
```

### Advanced Preprocessing Pipeline

- Automatically skips header comments in `data/customer_churn.csv`
- Adds richer features (engagement score, tenure buckets, login recency, billing/usage ratios)
- Encodes categorical bands and scales features for model-friendly inputs
- Balances the training split with SMOTE to handle churn class imbalance
- Saves the ready-to-use dataset to `data/customer_churn_preprocessed.csv`

## Use Cases

1. **Churn Prediction** - Build classification models to predict customer churn
2. **Customer Segmentation** - Identify customer segments based on behavior
3. **Retention Analysis** - Analyze factors affecting customer retention
4. **Behavior Pattern Analysis** - Understand customer usage patterns
5. **ML Model Training** - Train and evaluate various ML algorithms

## Project Structure

```
customer-churn/
├── data/
│   └── customer_churn.csv          # Main dataset file
├── scripts/
│   ├── data_exploration.py         # Data exploration script
│   ├── data_preprocessing.py       # Data preprocessing script
│   └── model_training.py           # Model training script
├── notebooks/
│   └── analysis.ipynb              # Jupyter notebook for analysis
├── index.html                      # Demo page
├── README.md                       # This file
└── customer-churn.zip              # Compressed dataset
```

## Contact Information

**Provided by RSK World**

- 🌐 **Website:** [https://rskworld.in/](https://rskworld.in/)
- 📧 **Email:** [help@rskworld.in](mailto:help@rskworld.in)
- 📱 **Phone:** [+91 93305 39277](tel:+919330539277)
- 📞 **Contact Page:** [https://rskworld.in/contact.php](https://rskworld.in/contact.php)

## License

This dataset is provided for educational and research purposes. Please refer to the LICENSE file for more details.

## Contributing

Contributions, issues, and feature requests are welcome! Feel free to contact us through our website.

## Acknowledgments

- Dataset provided by RSK World
- For more resources, visit [https://rskworld.in/](https://rskworld.in/)

