无法访问seaborn示例数据集

问题描述 投票:0回答:1

我试图使用来自seaborn的“tips”数据集:

import seaborn as sns
tips = sns.load_dataset("tips")

我收到了这个错误:

ValueError                                Traceback (most recent call last)
Cell In[5], line 1
----> 1 a = sns.load_dataset("anagrams")
      2 a.info()

File C:\anaconda3\lib\site-packages\seaborn\utils.py:587, in load_dataset(name, cache, data_home, **kws)
    585 if not os.path.exists(cache_path):
    586     if name not in get_dataset_names():
--> 587         raise ValueError(f"'{name}' is not one of the example datasets.")
    588     urlretrieve(url, cache_path)
    589 full_path = cache_path

ValueError: 'anagrams' is not one of the example datasets.

然后我尝试了:

sns.get_dataset_names()

输出是一个空列表:[]

我可以使用seaborn 绘图。我还尝试使用以下方法更新我的seaborn:

!pip install seaborn --upgrade

但这并没有帮助。

你能帮忙吗?

python dataset seaborn
1个回答
0
投票

这对我来说非常适合

python 3.10.0
seaborn 0.13.1

import seaborn as sns
tips = sns.load_dataset("tips")

您能告诉我们您的

python
seaborn
版本吗?

© www.soinside.com 2019 - 2024. All rights reserved.