Telecom Customer Churn
This dataset comes from an Iranian telecom company, with each row representing a customer over a year period. Along with a churn label, there is information on the customers' activity, such as call failures and subscription length.
Not sure where to begin? Scroll to the bottom to find challenges!
import pandas as pd
pd.read_csv("data/customer_churn.csv")
Data Dictionary
Column | Explanation |
---|---|
Call Failure | number of call failures |
Complaints | binary (0: No complaint, 1: complaint) |
Subscription Length | total months of subscription |
Charge Amount | ordinal attribute (0: lowest amount, 9: highest amount) |
Seconds of Use | total seconds of calls |
Frequency of use | total number of calls |
Frequency of SMS | total number of text messages |
Distinct Called Numbers | total number of distinct phone calls |
Age Group | ordinal attribute (1: younger age, 5: older age) |
Tariff Plan | binary (1: Pay as you go, 2: contractual) |
Status | binary (1: active, 2: non-active) |
Age | age of customer |
Customer Value | the calculated value of customer |
Churn | class label (1: churn, 0: non-churn) |
Don't know where to start?
Challenges are brief tasks designed to help you practice specific skills:
- πΊοΈ Explore: Which age groups send more SMS messages than make phone calls?
- π Visualize: Create a plot visualizing the number of distinct phone calls by age group. Within the chart, differentiate between short, medium, and long calls (by the number of seconds).
- π Analyze: Are there significant differences between the length of phone calls between different tariff plans?
Scenarios are broader questions to help you develop an end-to-end project for your portfolio:
You have just been hired by a telecom company. A competitor has recently entered the market and is offering an attractive plan to new customers. The telecom company is worried that this competitor may start attracting its customers.
You have access to a dataset of the company's customers, including whether customers churned. The telecom company wants to know whether you can use this data to predict whether a customer will churn. They also want to know what factors increase the probability that a customer churns.
You will need to prepare a report that is accessible to a broad audience. It should outline your motivation, steps, findings, and conclusions.
To assist the client we would need to fully understand the company's current perfomance and by extension its impact in the market. We would like to propose to the client the exact amount they can offer up as a discount without drastically affecting profit. But adequate to prevent customer churn.
Data Understanding
df = pd.read_csv("data/customer_churn.csv")
df.head()
# Summary of columns and rows
df.info()
We observe the data has 13 columns all numeric with zero null values. We therefore willnot need to carry out much data cleaning. although some columns contain cartegorical data and we'll need to consider that during modelling.
How many clients have active Subscriptions
we will use group by in order to see the average nuber of months subscriptions are held.
# Active subscription
df.groupby(['Subscription Length', 'Tariff Plan']).sum().reset_index()
# Futher analysis on Subscription
# how many clients with over 30 months who left.
df[(df['Subscription Length'] > 30) & (df['Churn'] == 1)].count()
We observe out out the total nuber of 3150, only 386 clients left. This is a good indicator since we see not a large number of long term clients left the organization. we can try and observe the inverse to see those who had recently joined the subscription service and left.
df[(df['Subscription Length'] < 30) & (df['Churn'] == 1)].count()
β
β