Pass proxy to Seaborn

前端 未结 2 1657
礼貌的吻别
礼貌的吻别 2021-01-21 13:55

I am using seaborn for data visualization. But it fails over the sample data it has in documentation

import seaborn as sns
sns.set()
tips = sns.load         


        
2条回答
  •  盖世英雄少女心
    2021-01-21 14:47

    You can download the file manually.

    Use

    import seaborn as sns
    print(sns.utils.get_data_home())
    

    to find out the folder for your seaborn data, e.g. it might come out as C:\Users\username\seaborn-data on windows.

    Download the file https://raw.githubusercontent.com/mwaskom/seaborn-data/master/tips.csv to that folder. Finally, use the "cached" option

    sns.load_dataset("tips", cache=True)
    

    Alternatively download the file to any other folder. Use that folder's pathname as data_home argument

    sns.load_dataset(name, cache=True, data_home="path/to/folder")
    

提交回复
热议问题