LoslegenKostenlos loslegen

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.

Diese Übung ist Teil des Kurses

Analyzing Marketing Campaigns with pandas

Kurs anzeigen

Anleitung zur Übung

  • 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.

Interaktive Übung

Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.

# 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')
____
____
Code bearbeiten und ausführen