MulaiMulai sekarang secara gratis

Setting up our data to visualize daily conversion

When you want to understand how your campaign performed, it is essential to look at how key metrics changed throughout the campaign. Your key metrics can help you catch problems that may have happened during the campaign, such as a bug in the checkout system that led to a dip in conversion toward the end of your campaign. Metrics over time can also surface trends like gaining more subscribers over the weekends or on specific holidays.

In this exercise, you will build upon the daily conversion rate Series daily_conversion_rates you built in a previous exercise. Before you can begin visualizing, you need to transform your data into an easier format to use with pandas and matplotlib.

Latihan ini adalah bagian dari kursus

Analyzing Marketing Campaigns with pandas

Lihat Kursus

Petunjuk latihan

  • Reset the index of the daily_conversion_rates Series and use pd.DataFrame() to convert the results into a DataFrame named daily_conversion_rate.
  • Rename the columns in the new DataFrame daily_conversion_rate to be 'date_served' and 'conversion_rate'.

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# Reset index to turn the results into a DataFrame
daily_conversion_rate = ____(daily_conversion_rates.____(____))

# Rename columns
daily_conversion_rate.____ = ['____', 
                              '____']
Edit dan Jalankan Kode