I have a script with the following code that is working as intended
Table2 = df.loc[df.Date.between('2018-11-22','2018-11-30')].groupby(df['FPYear'])[['New Customer', 'Existing Customer', 'revenue']].sum()
However, now i am trying to add an additional criterion in order to filter on a column called "region" which has the value Canada in the dataset but it doesn't seem to be working.
Table2 = df.loc[df.Date.between('2018-11-22','2018-11-30'), df['Region'] = 'Canada'].groupby(df['FPYear'])[['New Customer', 'Existing Customer', 'revenue']].sum()
The additional filter seems to have no impact. Can anyone help. Thanks
&.