Skip to content
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

Yahoo changed their returned field values breaking ffn.get() for Yahoo #34

Closed
bengebre opened this issue Feb 21, 2018 · 5 comments
Closed

Comments

@bengebre
Copy link

pandas-datareader 0.7.0 (released today) fixes the latest Yahoo data breakage, but Yahoo is now using new field values which breaks ffn.get(). For instance, 'Adj Close' changed to 'adjclose'. I replaced the two references to 'Adj Close' with 'adjclose' in data.py and now ffn.get() returns data, but the dataframe is only number indexed rather than date indexed. It's my first day with ffn so I'm not sure what typical behavior is, but I was just comparing my results to the examples and saw this discrepancy.

@bengebre
Copy link
Author

Followup: I read an Issue regarding pandas-datareader's 0.7.0 stable release fixing the Yahoo problems, but I was actually using the development version pulled straight from github. Apologies on the confusion. The issue may be exactly the same when 0.7.0 is released, but it's probably smart to wait to see what the stable version looks like. It should be within the next week according to this:

pydata/pandas-datareader#495

@rubik
Copy link
Contributor

rubik commented May 29, 2018

I have temporarily fixed this with the following code:

import pandas_datareader as pdr
import fix_yahoo_finance as yf
pdr.data.get_data_yahoo = lambda *a, **kw: yf.download(*a, **kw, progress=False)
import ffn

You will need the fix_yahoo_finance package.

@JordanPlatts
Copy link
Collaborator

Do you want to submit a pull request?

@JordanPlatts
Copy link
Collaborator

The pull request doesn't work with python 2.7.

I don't really want to merge it because some people use 2.7 and this seems like a temporary fix till they release pandas_datareader 0.7.0.

@rubik
Copy link
Contributor

rubik commented May 30, 2018

Ah I forgot about Python 2.7. That's very reasonable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants