CommencerCommencer gratuitement

Analyzing House ads conversion rate

Now that you have confirmed that house ads conversion has been down since January 11, you will try to identify potential causes for the decrease.

As a data scientist supporting a marketing team, you will run into fluctuating metrics all the time. It's vital to identify if the fluctuations are due to expected shifts in user behavior (i.e., differences across the day of the week) versus a larger problem in technical implementation or marketing strategy.

In this exercise, we will begin by checking whether users are more likely to convert on weekends compared with weekdays and determine if that could be the cause for the changing house ads conversion rate.

Cet exercice fait partie du cours

Analyzing Marketing Campaigns with pandas

Afficher le cours

Instructions

  • Add a day of week column to the marketing DataFrame using dt.dayofweek based on the 'date_served' column.
  • Use conversion_rate to calculate conversion by the day of week and marketing channel and store the results in DoW_conversion.
  • Create a line plot of the results, set the y-axis to begin at 0 and display the plot.

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# Add day of week column to marketing
marketing['DoW_served'] = ____

# Calculate conversion rate by day of week
DoW_conversion = conversion_rate(____, ['____', '____'])


# Unstack channels
DoW_df = pd.DataFrame(DoW_conversion.unstack(level=1))

# Plot conversion rate by day of week
DoW_df____
plt.title('Conversion rate by day of week\n')
____
____
Modifier et exécuter le code