Save up to $499! Grab all Python courses for $49 or all online courses we’ve ever launched for only $169. Only Feb 11-16. Happy Valentine's!
Filtering by row
3. Subset rows: many conditions
Extracting data by column
Practice using filter() and select()
The pipe operator
Sorting rows


We can use more than one condition with filter(). Just use a comma (,) after each condition; filter() will interpret the comma as an and operator.

If we wanted to subset African countries with areas greater than or equal to 1,000 square kilometers, we would write:

filter(countries, continent == "Africa", area >= 1000)


Subset Asian countries that are less than 500 square kilometers in area.

Stuck? Here's a hint!


filter(countries, continent == "Asia", area < 500)