Filter Rows
Take a look at the filter() function and how to use it effectively.
The filter()
function allows us to specify criteria about the values of a variable in our dataset and then filters out only the rows that match that criteria.
We begin by focusing only on flights from New York City to Portland, Oregon. The dest
destination code (or airport code) for Portland, Oregon is "PDX"
. Run the following and look at the results to ensure that only flights heading to Portland are chosen here:
Get hands-on with 1400+ tech skills courses.