pandas gropu por
df1.groupby(["Name", "City"]).size().reset_index(name='count')
Condemned Cowfish
df1.groupby(["Name", "City"]).size().reset_index(name='count')