Predicting Customer Churn in Telecom
Predicting Customer Churn in Telecom
ications
Churn
Prediction
PREDICTING CUSTOMER CHURN IN TELECOM :
Churn?
what is Telcom
Customer
Churn ?
Customers in telecmunication can switch to one Service privider to
another this can cause the telcom cutomer churn.
Common
Causes of
Telecom
Churn
Poor Network Quality (dropped calls, slow internet)
from Kaggle
Data:
This data set is about 7043 cutomer records out of then 1869
Cutomers
Columns
Discription
lets see random 5
records of cutomer
tel.sample(
5)
tel.info
()
tel['TotalCharges']=pd.to_numeric(tel['TotalCharges'],errors='c
oerce')
tel.info()
temp=tel.copy()
tel['SeniorCitizen']=list(tel['SeniorCitizen'].map({0:'No',
1:'Yes'}))
tel['SeniorCitizen']
tel.info
()
Data Cleaning
tel[tel['TotalCharges'].isnu
ll()]
tel[tel['tenure']=
=0]
tel[tel['Dependents']=='Y
es']
# tel=tel[tel['tenure']!=0]
tel[tel['Contract']=='Two year']
['tenure'].describe()
df_temp=tel[(tel['Contract']=='Two year') &
(tel['PaymentMethod']=='Mailed check')]
# df_temp.isnull().sum
df_temp.dropna(inplace=Tr
ue)
df_temp.head(
.
2)
.
Cleaning Done
Data
Visulization
import seaborn as sns
import matplotlib.pyplot as
plt
plt.pie(tel['Churn'].value_counts(),labels=['No',
'Yes'],autopct='%1.1f%
%',colors=['green','red'],explode=[0.1, 0])
plt.title("Churn Percentage")
plt.show()
Data
Visulization
sns.countplot(data=tel,x='Ch
urn')
Data
Visulization
sns.countplot(data=tel,x='Churn',hue='ge
nder')
Data
Visulization
sns.countplot(data=tel,x='Contract',hue='Chur
n',palette="Set2")
# sns.histplot(data=tel,tel['
df.sample()
sns.histplot(data=tel,x=df['MonthlyChar
ges'],hue='Churn')
Data
Visulization
sns.countplot(data=tel,x='Contract',hue='Ch
urn',palette="Set2")
# sns.histplot(data=tel,tel['
df.sample()
sns.histplot(data=tel,x=df['MonthlyCharges']
,hue='Churn')
Data
Visulization
sns.kdeplot(data=tel,x=df['MonthlyCharges']
,hue='Churn')
Data
Visulization
tel.sample()
sns.countplot(data=tel,x=tel['Dependents'],
hue=tel['Churn'],palette='Set1')
Data
Visulization
sns.countplot(data=tel,x=tel['PhoneService']
,hue='Churn',palette='Set1')
Data
Visulization
sns.countplot(data=tel,x=tel['InternetServic
e'],hue='Churn')
sns.countplot(data=tel,x=tel['OnlineSecurity
'],hue='Churn')
sns.countplot(data=tel,x=tel['DeviceProtecti
on'],hue=tel['Churn'])
sns.countplot(data=tel,x=tel['PaperlessBillin
g'],hue=tel['Churn'])
Data
Visulization
sns.countplot(data=tel,x=tel['TechSupport'],
hue=tel['Churn'])
sns.countplot(data=tel,x=tel['StreamingTV'],
hue=tel['Churn'])
sns.countplot(data=tel,x=tel['DeviceProtecti
on'],hue=tel['Churn'])
sns.countplot(data=tel,x=tel['StreamingMovi
es'],hue=tel['Churn'])
Data
Visulization
sns.kdeplot(data=tel,x=tel['tenure'],hue=tel
['Churn'])
Data
Visulization
tdf=tel[['tenure','MonthlyCharges','TotalChar
ges']]
tcorrelational=tdf.corr()
tcorrelational
CONCLU
SION
thanyo
k u!
PREDICTING CUSTOMER CHURN IN
TELECOM