Seaborn: Importing Datasets and Libraries

Here we will learn about how to import datasets and libraries in seaborn.

Importing Libraries

Firstly we will import all the required libraries. These are some libraries that are required:

  • Pandas: It is required because it can manage datasets.
  • Matplotlib: If there are some additional customisation required.
  • Seaborn: It is used for plotting and styling.
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns

 Importing Datasets

Seaborn comes with some of datasets in its library. When seaborn gets installed these datasets gets downloaded automatically.

We can load these dataset using a function given below:


Now we will import the dataset. These dataset behaves like panadas dataframe. We can perform same function on these dataset as we do on panadas dataframe.




We can also view the name of all the datasets in the Seaborn library, by using the following command: