gropby pandas code example Example: pandas gropu by df1.groupby(["Name", "City"]).size().reset_index(name='count')