Let\'s assume we have the following dataframe:
merged = pd.DataFrame({\'week\' : [0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2], \'shopper\' : [0