Get startedGet started for free

Exploring customer churn

Now that you know what customer churn is, let's examine the structure of our customer dataset, which has been pre-loaded into a DataFrame called telco. Being able to check the structure of the data is a fundamental step in the churn modeling process and is often overlooked.

Use pandas methods such as .info() to get a sense for its structure and notice the different columns (also known as "features" in machine learning), such as 'CustServ_Calls', which denotes the number of customer service calls the customer made, and 'State', which indicates the state the customer is from.

One feature is of particular interest to us: 'Churn', which can take in two values - yes and no - indicating whether or not the customer has churned. In this exercise, your job is to explore this feature. You can access it using telco['Churn'].

How many churners does the dataset have, and how many non-churners? To easily answer this, you can use the .value_counts() method on telco['Churn'].

This exercise is part of the course

Marketing Analytics: Predicting Customer Churn in Python

View Course

Hands-on interactive exercise

Turn theory into action with one of our interactive exercises

Start Exercise