BaşlayınÜcretsiz Başlayın

Understanding marketing campaign effectiveness

Imagine you're a digital marketer analyzing data from a recent campaign to understand what messaging style and time of day yield the highest conversions. This analysis is crucial for guiding future marketing strategies, ensuring that your messages reach potential customers when they're most likely to engage. In this exercise, you're working with a dataset giving the outcomes of different messaging styles ('Casual' versus 'Formal') and times of day ('Morning' versus 'Evening') on conversion rates, a common scenario in marketing data analysis.

The data has been loaded for you as a DataFrame named marketing_data, and pandas is loaded as pd.

Bu egzersiz

Experimental Design in Python

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Create a pivot table with 'Messaging_Style' as the index and 'Time_of_Day' as the columns, computing the mean of Conversions.
  • Print this pivot table.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Create a pivot table for marketing campaign data
marketing_pivot = marketing_data.____(
  values='____', 
  index='____', 
  columns='____', 
  aggfunc='____')

# View the pivoted results
print(____)
Kodu Düzenle ve Çalıştır