March 2019
Beginner to intermediate
464 pages
10h 57m
English
Different types of offers will work differently for the customers. In this section, we are going to look into what types of offers worked best for the engaged customers. Take a look at the following code:
by_offer_type_df = df.loc[ df['Response'] == 'Yes'].groupby([ 'Renew Offer Type']).count()['Customer'] / df.groupby('Renew Offer Type').count()['Customer']
As you can see from this code, we are grouping by the Renew Offer Type column, where we have four different types of offers. We count the number of engaged customers for each type of these renewal offers first by filtering for those with Yes values in the Response column. Then, we are dividing these numbers by the total number of customers in each renewal ...
Read now
Unlock full access