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)
😲 Agile task management is now easier than calling a taxi. #Tracklify
🙏 Scream for help to Ukraine
Today, 8th August 2022, Russia continues bombing and firing Ukraine. Don't trust Russia, they are bombing us and brazenly lying in same time they are not doing this 😠, civilians and children are dying too! We are screaming and asking exactly you to help us, we want to survive, our families, children, older ones.
Please spread the information, and ask your governemnt to stop Russia by any means. We promise to work extrahard after survival to make the world safer place for all.

Ways to fix

votes up 1 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 30.6k

Add a possible fix

Please authorize to post fix