yahoo finance를 사용하여 주식 데이터를 파이썬으로 읽고 있습니다. 그러나 주식과 함께 작동하지만, 상품에 오류가 있습니다.yahoo finance로 파이썬으로 상품을 읽으십시오
아래의 코드는 완벽하게 작동합니다 :
import pandas as pd
import numpy as np
import pandas.io.data as web
import datetime
# We will look at stock prices over the past year, starting at January 1, 2016
start = datetime.datetime(2016,1,1)
end = datetime.date.today()
stock = "AAPL"
# get stock data, from yahoo finance within the dates specified
stock = web.DataReader(stock, "yahoo", start, end)
stock.head(n=3)
을 그러나이 오류 얻을 대신 주식의 상품에 핸들을 변경하는 경우 :
가import pandas as pd
import numpy as np
import pandas.io.data as web
import datetime
# We will look at stock prices over the past year, starting at January 1, 2016
start = datetime.datetime(2016,1,1)
end = datetime.date.today()
stock = "GCG17.CMX"
# get stock data, from yahoo finance within the dates specified
stock = web.DataReader(stock, "yahoo", start, end)
stock.head(n=3)
OSError: after 3 tries, Yahoo! did not return a 200 for url 'http://ichart.finance.yahoo.com/table.csv?s=GCG17.CMX&a=0&b=1&c=1970&d=0&e=22&f=2017&g=d&ignore=.csv'
이 사람이 나를 도울 수 있습니까?
브라우저에 입력하면 http://ichart.finance.yahoo.com/table.csv?s=GCG17.CMX&a=0&b=1&c=1970&d=0&e=22&f=2017&g=d&ignore= 페이지가 표시됩니다. .csv – e4c5