-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG/API: data readers should return missing data as NaN rather than warn #8433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
in 0.14.1 and > this doesn't return any data (and returns a nice exception). Pls reopen / comment if this is still an issue. |
Thanks, jreback for the very quick reply. [Note, this is my 1st time working with github or reporting an issue, so bear with me if there's any conventions I am unaware of.] The problem is that in stocks, if there is even only 1 value equal to nan, then the Entire set of results is discarded and an error is returned. For example, the below works. I indicate lines I changed compared to v0.14.1.
|
@gayodeji actually this reproduces correctly by passing Ok, thought we had an issue for this somewhere. Going to fix the title. Your soln is not actually what we want here, rather returning a Panel with missing values for the non-returned data. Pls feel free to work on this. |
I have pandas version: pandas-0.13.1-py2.7-win32.egg
Routine pandas.io.data._dl_mult_symbols has an "except IOError" where the following is executed:
stocks[sym] = np.nan
The next thing that happens is:
try:
return Panel(stocks).swapaxes('items', 'minor')
However, if any of the values in stocks equals nan, then "return Panel(stocks).swapaxes('items', 'minor')" throws an error that is not handled and terminates the script.
I discovered this by calling pandas.io.data.get_data_yahoo(['EQQQ.F'],'20140930','20140930',3,0.001,False,False,5)
The text was updated successfully, but these errors were encountered: