Comparing language conversion rate (I)
The marketing team wants to determine how effective the campaign was on converting English speakers.
In this exercise, you will isolate the data for English speakers and calculate the conversion rate much like in the previous exercises. Remember, the formula for conversion rate is:
$$ \displaystyle\frac{\mbox{Number of people who convert}}{\mbox{Total number of people who we market to}} $$
Once you have the conversion rate for English speakers, you can compare it to the overall conversion rate to gain a sense of how effective the marketing campaign was among this group compared to the overall population.
This exercise is part of the course
Analyzing Marketing Campaigns with pandas
Exercise instructions
- Using the
marketing
DataFrame, include only the rows wherelanguage_displayed
is English. - Calculate the total number of users in the
english_speakers
DataFrame. - Calculate the number of conversions in the
english_speakers
DataFrame.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Isolate english speakers
english_speakers = marketing[____['____'] == '____']
# Calculate the total number of English speaking users
total = ____
# Calculate the number of English speakers who converted
subscribers = ___
# Calculate conversion rate
conversion_rate = subscribers/total
print('English speaker conversion rate:', round(conversion_rate*100,2), '%')