SEABORN DATASET NAMES
Listing 5.30 displays the contents dataset_names.py that displays the Seaborn built-in datasets, one of which we will use in a subsequent section in order to render a heat map in Seaborn.
Listing 5.30: dataset_names.py
import seaborn as sns
names = sns.get_dataset_names()
for name in names:
print("name:",name)
Listing 5.30 contains an import statement, followed by initializing the variable names with a list of the dataset names in Seaborn. Then a simple loop iterates through the values in the names variable and prints their values. The output from Listing 5.30 is here:
name: anagrams name: anscombe name: attention name: brain_networks name: car_crashes name: diamonds name: dots name: exercise name: flights name: fmri name: gammas name: geyser name: iris name: mpg name: penguins name: planets name: taxis name: tips name: titanic
The three-line code sample in the next section shows you how to display the rows in the built-in “tips” dataset...