Jun-25-2017, 02:26 PM
Dear Python Users,
I want to download a stock data from yahoo finance (or nasdaq.com) and use the following code. However, once I run it it gives the following message:
"ConnectionError: HTTPConnectionPool(host='ichart.finance.yahoo.com', port=80): Max retries exceeded with url: /table.csv?s=AMZN&a=8&b=1&c=2016&d=3&e=1&f=2017&g=d&ignore=.csv (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x000000ECDE8A4A58>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',))"
Please, help me to identify the issue.
I want to download a stock data from yahoo finance (or nasdaq.com) and use the following code. However, once I run it it gives the following message:
"ConnectionError: HTTPConnectionPool(host='ichart.finance.yahoo.com', port=80): Max retries exceeded with url: /table.csv?s=AMZN&a=8&b=1&c=2016&d=3&e=1&f=2017&g=d&ignore=.csv (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x000000ECDE8A4A58>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',))"
Please, help me to identify the issue.
from pandas_datareader import data as dreader symbols = ['AMZN'] pnls = {i:dreader.DataReader(i,'yahoo','2016-09-01','2017-04-01') for i in symbols} print(pnls.get('AMZN').head())