打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
Seaborn 的示例数据集(load

相信大家在学习GroupBy,或者数据透视表时,都有可能会碰到类似下面的一行代码:

  1. import seaborn as sns
  2. planets = sns.load_dataset('planets')

然后就可以发现planets已经存储了数据了,那么这些数据到底是从哪里来的呢?

我们查看一下load_dataset的docstring:

  1. In [54]: sns.load_dataset??
  2. Signature: sns.load_dataset(name, cache=True, data_home=None, **kws)
  3. Source:
  4. def load_dataset(name, cache=True, data_home=None, **kws):
  5. """Load a dataset from the online repository (requires internet).
  6. Parameters
  7. ----------
  8. name : str
  9. Name of the dataset (`name`.csv on
  10. https://github.com/mwaskom/seaborn-data). You can obtain list of
  11. available datasets using :func:`get_dataset_names`
  12. cache : boolean, optional
  13. If True, then cache data locally and use the cache on subsequent calls
  14. data_home : string, optional
  15. The directory in which to cache data. By default, uses ~/seaborn-data/
  16. kws : dict, optional
  17. Passed to pandas.read_csv
  18. """

可以看到docstring的第一行就说明了这个函数是从在线存储库加载数据集的(需要互联网)。

网址:https://github.com/mwaskom/seaborn-data

下面就是可以在线或取得数据集啦(可以用来做练习哦)

 

 

 

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
哪些Python库让你相见恨晚?
可视化神器Seaborn的超全介绍
如何利用Seaborn绘制热力图?
Seaborn 使用超简单入门
python的高级画图seaborn库安装、学习、经典实例
Python绘图库之Seaborn(二)
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服