问题
I used below code to use a dataset from my own github account(Disclaimer: Dataset used from some other location & name modified to keep in my github account). import seaborn as sns
df = sns.load_dataset('https://github.com/vishalkrsinha/Python/blob/Data/FiveYearData.csv')
But, it gives me the error as below(Traceback). I understand load_dataset() function looks for online dataset. I also tried using physical path (as online path was giving error) but could not succeed. Kindly suggest the solution.
Traceback (most recent call last): File "D:/DataVisualization/Test.py", line 10, in df = sns.load_dataset('https://github.com/vishalkrsinha/Python/blob/Data/FiveYearData.csv') File "C:\Users\user1\AppData\Roaming\Python\Python37\site-packages\seaborn\utils.py", line 428, in load_dataset urlretrieve(full_path, cache_path) File "C:\Users\user1\AppData\Local\Programs\Python\Python37\lib\urllib\request.py", line 247, in urlretrieve with contextlib.closing(urlopen(url, data)) as fp: File "C:\Users\user1\AppData\Local\Programs\Python\Python37\lib\urllib\request.py", line 222, in urlopen return opener.open(url, data, timeout) File "C:\Users\user1\AppData\Local\Programs\Python\Python37\lib\urllib\request.py", line 531, in open response = meth(req, response) File "C:\Users\user1\AppData\Local\Programs\Python\Python37\lib\urllib\request.py", line 641, in http_response 'http', request, response, code, msg, hdrs) File "C:\Users\user1\AppData\Local\Programs\Python\Python37\lib\urllib\request.py", line 569, in error return self._call_chain(*args) File "C:\Users\user1\AppData\Local\Programs\Python\Python37\lib\urllib\request.py", line 503, in _call_chain result = func(*args) File "C:\Users\user1\AppData\Local\Programs\Python\Python37\lib\urllib\request.py", line 649, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 404: Not Found
Process finished with exit code 1
来源:https://stackoverflow.com/questions/57040450/not-able-to-resolve-issuehttp-error-404-with-seaborn-load-dataset-function