IniziaInizia gratis

Calculating snapshot targets

Assume you want to predict who will make large donations, i.e. 500 Euro or more, in January 2019. As January is a very specific month, it is better to only use January snapshots. In order to obtain enough data, you want to include two snapshots, namely January 2018 and January 2017. In this exercise you will learn how to calculate the target values for these different snapshots.

Questo esercizio fa parte del corso

Intermediate Predictive Analytics in Python

Visualizza il corso

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

# Sum of donations for each donor
gifts_summed_january_2017 = gifts_january_2017.groupby("____")["____"].____().reset_index()
gifts_summed_january_2018 = gifts_january_2018.groupby("____")["____"].____().reset_index()
Modifica ed esegui il codice