criteria : use groupby instead of merge