zoukankan      html  css  js  c++  java
  • Seaborn 的示例数据集(load_dataset)

    Seaborn 的示例数据集(load_dataset)

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

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

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

    我们查看一下load_dataset的docstring:

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

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

    网址:我是GitHub

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


  • 相关阅读:
    五种线程池的分类与作用
    什么是死锁?
    事务隔离级别区分,未提交读,提交读,可重复读
    共享锁(读锁)和排他锁(写锁)
    java中的成员变量和全局变量的区别
    Algorithm
    6
    5
    4
    3
  • 原文地址:https://www.cnblogs.com/lskreno/p/10844263.html
Copyright © 2011-2022 走看看