Python Pandas Dataframe GroupBy Size based on condition,"df.groupby(['id', 'date1']).apply(lambda x: (x['date1'] == x['date2']).sum())"