LoslegenKostenlos loslegen

Calculating aggregated variables with timegap

Assume you want to construct a predictive model to predict which donors will make a donation of at least 10 Euro during the next month. The timeline is given below, there is a timegap of one month. In this exercise, you will learn how to add a variable "mean_donation_last_month" to the basetable.

Diese Übung ist Teil des Kurses

Intermediate Predictive Analytics in Python

Kurs anzeigen

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

# Start and end date of last month
start_date = datetime.date(____, ____, ____)
end_date = datetime.date(____, ____, ____)
Code bearbeiten und ausführen