Applying multiple filter criteria to a pandas DataFrame

In this section, we will learn about methods for applying multiple filter criteria to a pandas DataFrame. We will use logical AND/OR conditional operators to select records from our real dataset. We'll also see how to use the isin() method for filtering records. We will demonstrate the isin method on our real dataset for both single column and multiple column filtering.

We will start by importing the pandas module and reading the dataset of house prices from zillow.com into the Jupyter Notebook, as follows:

data = pd.read_table('data-zillow.csv', sep=',')data.head()

The following is the output:

Get Mastering Exploratory Analysis with pandas now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.