iris = sns.load_dataset("iris") sns.pairplot(iris)


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

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

我们查看一下load_dataset的docstring:


 
 
  1. In [ 100]: 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

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

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值