i am try to pullout intraday aapl stock data by yahoo. but there problem i facing with my program..
import pandas as pd
import datetime
import urllib2
import matplotlib.pyplot as plt
get = 'http://chartapi.finance.yahoo.com/instrument/1.0/aapl/chartdata;type=quote;range=1d/csv'
getdata = urllib2.urlopen(get).read()
df = pd.read_csv(getdata, skiprows=17, header=None)
print df.head()
and error is this....
Traceback (most recent call last):
File "getyahoodata.py", line 10, in <module>
df = pd.read_csv(getdata, skiprows=16, header=None)
File "/usr/lib/python2.7/dist-packages/pandas/io/parsers.py", line 420, in parser_f
return _read(filepath_or_buffer, kwds)
File "/usr/lib/python2.7/dist-packages/pandas/io/parsers.py", line 218, in _read
parser = TextFileReader(filepath_or_buffer, **kwds)
File "/usr/lib/python2.7/dist-packages/pandas/io/parsers.py", line 502, in __init__
self._make_engine(self.engine)
File "/usr/lib/python2.7/dist-packages/pandas/io/parsers.py", line 610, in _make_engine
self._engine = CParserWrapper(self.f, **self.options)
File "/usr/lib/python2.7/dist-packages/pandas/io/parsers.py", line 972, in __init__
self._reader = _parser.TextReader(src, **kwds)
File "parser.pyx", line 330, in pandas.parser.TextReader.__cinit__ (pandas/parser.c:3200)
File "parser.pyx", line 557, in pandas.parser.TextReader._setup_parser_source (pandas/parser.c:5559)
IOError: File uri:/instrument/1.0/aapl/chartdata;type=quote;range=1d/csv
ticker:aapl
1413811857,98.3800,98.4999,98.3000,98.3800,1327900
1413811908,98.5200,98.6196,98.3360,98.3800,380100
1413811978,98.4200,98.5300,98.3850,98.4700,993800:::::::::::::::::::::::::::::::::::::::::::::
:::::::::::::::::::::::::::::::::::::::::::::
more and more1413835019,99.8800,99.9100,99.8600,99.9000,524300
1413835079,99.8600,99.8850,99.8500,99.8700,600400
1413835139,99.8100,99.8600,99.7900,99.8500,530900
1413835199,99.7201,99.8301,99.7000,99.8200,1001500
1413835200,99.7600,99.7600,99.7600,99.7600,1720500
does not exist
in yahoo data pulling program show full data...but when i am useing google it work perfect...please try above program help to write program...thanks...