Changed groupby to group_by