votes up 2

'(name)' is not one of the example datasets.

Package:
Exception Class:
ValueError

Raise code

    url = f"https://raw.githubusercontent.com/mwaskom/seaborn-data/master/{name}.csv"

    if cache:
        cache_path = os.path.join(get_data_home(data_home), os.path.basename(url))
        if not os.path.exists(cache_path):
            if name not in get_dataset_names():
                raise ValueError(f"'{name}' is not one of the example datasets.")
            urlretrieve(url, cache_path)
        full_path = cache_path
    else:
        full_path = url

    df = pd.read_csv(full_path, **kws)
😲  Walkingbet is Android app that pays you real bitcoins for a walking. Withdrawable real money bonus is available now, hurry up! 🚶

Ways to fix

votes up 0 votes down

This exception is raised when the wrong is given while loading example data set from seaborn.

Steps to reproduce the exception:

import seaborn
data = seaborn.load_dataset(name = "penguin")

---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-4-72abfc038c3c> in <module>() ----> 1 data = seaborn.load_dataset(name = "penguin") 
/usr/local/lib/python3.7/dist-packages/seaborn/utils.py in load_dataset(name, cache, data_home, **kws)  593 if not os.path.exists(cache_path):  594 if name not in get_dataset_names(): --> 595 raise ValueError(f"'{name}' is not one of the example datasets.")  596 urlretrieve(url, cache_path)  597 full_path = cache_path 
ValueError: 'penguin' is not one of the example datasets.

Fixed version of the code:

import seaborn
data = seaborn.load_dataset(name = "penguins")
print(data)

Aug 03, 2022 kellemnegasi answer
kellemnegasi 31.6k

Add a possible fix

Please authorize to post fix