Rossmann - window functions to calculate rolling quantities

Hey,

In the Rossmann notebook, can anyone please explain this in more detail?

bwd = df[['Store']+columns].sort_index().groupby("Store").rolling(7, min_periods=1).sum()

These are the columns

columns = ['SchoolHoliday', 'StateHoliday', 'Promo']

This is the dataframe df

This is the output bwd

This is the final merged end result.

I think I understand the code - but not able to figure out what StateHoliday_bw and StateHoliday_fw signifies in this?

Thanks

EDIT: Figured this out. Just the number of days past a holiday for a store.
Not able to delete this topic.

Arjun

5 Likes

I’m glad you didn’t delete it - it’s a useful analysis you did here :slight_smile:

2 Likes