LoslegenKostenlos loslegen

Grouping and counting by multiple columns

Stakeholders have begun competing to see whose channel had the best retention rate from the campaign. You must first determine how many subscribers came from the campaign and how many of those subscribers have stayed on the service.

It's important to identify how each marketing channel is performing because this will affect company strategy going forward. If one channel is outperforming others, it might signal the channel merits further investment.

You will build on what we have learned about .groupby() in previous exercises, this time grouping by multiple columns.

Diese Übung ist Teil des Kurses

Analyzing Marketing Campaigns with pandas

Kurs anzeigen

Interaktive Übung

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

# Count the subs by subscribing channel and day
retention_total = marketing.____(['date_subscribed',
                                     ____])____

# Print results
print(retention_total.head())
Code bearbeiten und ausführen