Python Pandas Yahoo Stock Data Error
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
Solution 1:
pd.read_csv
accepts a path or a filelike object. You're passing the text itself, and it's trying to read that as a filename. You can just pass the URL (although get
isn't a great variable name..)
In [102]: df = pd.read_csv(get, skiprows=17, header=None)
In [103]: df.head()
Out[103]:
0 1 2 3 4 5
0 1413811859 98.3800 98.5000 98.3100 98.4800 1348400
1 1413811860 98.4775 98.6196 98.3265 98.3701 452200
2 1413811977 98.4250 98.5400 98.3800 98.4700 900000
3 1413812039 98.4800 98.4900 98.3900 98.4250 378100
4 1413812040 98.8300 98.8500 98.4700 98.4800 495300
Post a Comment for "Python Pandas Yahoo Stock Data Error"