I am new to python & using ancaconda.
While importing data in seaborn using jupyter notebook, URL error is shown.
Program:
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
%matplotlib inline
tips = sns.load_dataset('tips') >>>>>>This throws #@error.
Error msg File attached
Help.txt
Hi @shaminder1 ,
Thanks for your question but are you sure you posted this question to the right project? This project does not use seaborn at all so your code seems to come from somewhere else.
In any case, the exception is URLError: <urlopen error [Errno 11001] getaddrinfo failed>. This looks like a network-related problem. Since it happens during name resolution (getaddrinfo=DNS), perhaps check your DNS configuration? Maybe there's a firewall or something. Or perhaps try connecting to a different network and see if the problem persists.
If it does, I'm afraid I can't help you. You could try posting an issue on the seaborn project, they will know which URL is being queried and that might give you a clue to what's wrong.
Hope this helps.
@ageron I was not aware of structure of github .. Thanks for advice.
Someone helped me on that iris=sns.load_dataset('iris') loads local directory !
So it could be useful for others
1)find the location of the default cache by using sns.utils.get_data_home() - it is %homedir%\seaborn-data
2) Downloading https://github.com/mwaskom/seaborn-data/ as a zip file and extracting the contents of the enclosed seaborn_data_master directory to "seaborn-data" in home directory.
sns.load_dataset('XXXXX') now works!