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
2. Subset rows: single condition
Extracting data by column
Practice using filter() and select()
The pipe operator
Sorting rows


We've seen some of our data and know what to expect. Let's begin using dplyr.

First, we'll learn a new way of filtering rows: the filter() function. Suppose we only want to see information about Panama. We'd write:

filter(countries, country_name == "Panama")

Notice that the name of the dataset is the first argument. Next, we have the filtering conditions. In this case, we want the information in the country_name column to equal "Panama".

Important: Don't include single (') or double quotes (") around the column name.


Get information about France from countries. The column name is country_name.

Stuck? Here's a hint!


filter(countries, country_name == "France")