Here we will learn about how to import datasets and libraries in seaborn.
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
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:
['anagrams', 'anscombe', 'attention', 'brain_networks', 'car_crashes', 'diamonds', 'dots', 'exercise', 'flights', 'fmri', 'gammas', 'geyser', 'iris', 'mpg', 'penguins', 'planets', 'taxis', 'tips', 'titanic']