LoslegenKostenlos loslegen

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.

Diese Übung ist Teil des Kurses

Working with Categorical Data in Python

Kurs anzeigen

Interaktive Übung

Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.

# Print the category of the coat for ID 23807
print(dogs.loc[____, ____])
Code bearbeiten und ausführen