Get startedGet started for free

Accessing and filtering data

You are working on a Python application to display information about the dogs available for adoption at your local animal shelter. Some of the variables of interest, such as "breed", "size", and "coat", are saved as categorical variables. In order for this application to work properly, you need to be able to access and filter data using these columns.

The ID variable has been set as the index of the pandas DataFrame dogs.

This exercise is part of the course

Working with Categorical Data in Python

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Print the category of the coat for ID 23807
print(dogs.loc[____, ____])
Edit and Run Code