I have a dataframe of people that, among many others, has columns for the city and type of pet each person prefers. I would like to find the city where a certain pet is most prevalent.
City Pet
New York Cat
Washington Dog
Boston Dog
New York Cat
Atlanta Cat
New York Dog
Atlanta Dog
Boston Dog
So in this case, New York would have the most cats and Boston would have the most dogs.
How do I determine which city has e.g., the most cats for my larger dataframe?