Plotting with Data-Aware Grids

In this section, we'll learn about drawing multiple instances of the same plot on different subsets of our dataset. We'll learn about grid plotting with seaborn's FacetGrid method. We'll also explore seaborn's PairGrid and PairPlot methods for grid plotting.

Let's start by importing our Python modules in the Jupyter Notebook, in the following code:

import pandas as pdfrom matplotlib import pyplot as plt%matplotlib inlineimport seaborn as sns

We now need to read in our first CSV dataset using the following code:

df = pd.read_csv('data-titanic.csv')df.head()

The output from the preceding command is as follows:

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.