Pandas-datareader: ImmediateDeprecationError raise when trying to get data from yahoo

Created on 18 Mar 2018  ·  27Comments  ·  Source: pydata/pandas-datareader

Hello,

I am quite confused about the new module pandas_datareader.
As I learn from the website, pandas.io is changed to this new module. But there occurs a new issue, and I cannot find the same issue that anyone has ever met.
Would you please give me some advice on how to get data correctly by pandas_datareader module?

import pandas as pd
import datetime
import pandas_datareader.data as web
start = datetime.datetime(2010,1,1)
end = datetime.datetime(2015,1,1)
df = web.DataReader('XOM','yahoo',start,end)
Traceback (most recent call last):
File "", line 1, in
File "D:\program file\python27\lib\site-packages\pandas_datareader\data.py", l
ine 291, in DataReader
raise ImmediateDeprecationError(DEP_ERROR_MSG.format('Yahoo Daily'))
pandas_datareader.exceptions.ImmediateDeprecationError:
Yahoo Daily has been immediately deprecated due to large breaks in the API witho
ut the
introduction of a stable replacement. Pull Requests to re-enable these data
connectors are welcome.

See https://github.com/pydata/pandas-datareader/issues

Most helpful comment

I got a solution by using this package
https://pypi.python.org/pypi/fix-yahoo-finance

from pandas_datareader import data as pdr
import datetime
import fix_yahoo_finance as yf
yf.pdr_override()

pdr.get_data_yahoo('AAPL',
start=datetime.datetime(2006, 10, 1),
end=datetime.datetime(2012, 1, 1))

All 27 comments

same problem:

ImmediateDeprecationError: 
Yahoo Actions has been immediately deprecated due to large breaks in the API without the
introduction of a stable replacement. Pull Requests to re-enable these data
connectors are welcome.

This is the correct PDR. Yahoo changed their API and was not working when
0.6 was released.

On Sun, Mar 18, 2018 at 2:13 PM 草剑 notifications@github.com wrote:

same problem:

ImmediateDeprecationError:
Yahoo Actions has been immediately deprecated due to large breaks in the API without the
introduction of a stable replacement. Pull Requests to re-enable these data
connectors are welcome.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/pydata/pandas-datareader/issues/507#issuecomment-374002422,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFU5RUBLXVFeL1rDy3-3V_9Jsv3ddRbdks5tfmt1gaJpZM4SvNiN
.

When will be 0.7 released??? Will this fix the issue?

I get data by this way:

wx20180320-042729

Thank you very much - I will test it tomorrow and I will run my usual tests...

pdr.get_data_yahoo("DAI.DE")
Open High Low Close Adj Close Volume
Date
2010-01-04 37.240002 37.595001 36.959999 37.549999 27.826933 3673833
2010-01-05 37.500000 37.560001 36.869999 37.240002 27.597206 3897480
2010-01-06 37.189999 37.330002 36.619999 37.250000 27.604614 3615525

@jingsupo Hi jingsupo! I tried your method, it still indicated 'Yahoo Actions has been immediately deprecated...'. My pandas-datareader==0.6.0, do I need to update it? Really need such data, hope you can help me. Thanks.

@jingsupo That is quite strange. I have also tried your method, but still get error response.
When I try to get data from other company, for example google, there will be no error but timeout. Maybe this timeout is due to GFW, I don't care about it.
It seems only yahoo will cause this error

@Xinye3 Hi Xinye3! I just tested it, and it's still successful.

In [1]: import pandas_datareader as pdr

In [2]: import datetime

In [3]: start = datetime.datetime(2018,1,1)

In [4]: end = datetime.date.today()

In [5]: baba = pdr.get_data_yahoo('BABA', start, end)

In [6]: baba
Out[6]:
          date        high         low        open       close    volume  \
0   2018-03-19  198.429993  192.800995  198.000000  194.529999  19481200
1   2018-03-16  200.380005  197.259995  198.399994  200.279999  26948700
2   2018-03-15  201.500000  196.520004  198.440002  199.059998  33504600
3   2018-03-14  193.630005  190.220001  190.289993  192.559998  20032300
4   2018-03-13  194.250000  187.389999  193.880005  188.410004  14826700
5   2018-03-12  194.399994  190.899994  192.300003  192.740005  17826200
6   2018-03-09  190.699997  188.009995  189.639999  190.550003  14208400
7   2018-03-08  190.229996  186.570007  189.050003  187.179993  14331400
8   2018-03-07  189.070007  184.320007  184.369995  189.050003  13728900
9   2018-03-06  188.009995  184.820007  185.190002  187.369995  17856100
10  2018-03-05  181.949997  177.070007  179.410004  181.600006  15656700

My pdr version is:
In [10]: pdr.__version__ Out[10]: '0.6.0+4.g0debb02'

@panfeng-espressif 也许吧,我是开了VPN的,哈哈

但是我刚刚把VPN关了测试了一下,依然可以成功从yahoo获取数据,但无法从google获取数据。

@jingsupo Hi jingsupo, It's still wrong! maybe I was in the another planet. I will try to use VPN.

Same problem

error_datayahoo

Same problem...
raceback (most recent call last):
File "", line 1, in
tsla=pdr.get_data_yahoo('TSLA', start, end)
File "C:\Python36\lib\site-packages\pandas_datareader\data.py", line 63, in get_data_yahoo
raise ImmediateDeprecationError(DEP_ERROR_MSG.format('Yahoo Actions'))
pandas_datareader.exceptions.ImmediateDeprecationError:
Yahoo Actions has been immediately deprecated due to large breaks in the API without the
introduction of a stable replacement. Pull Requests to re-enable these data
connectors are welcome.

See https://github.com/pydata/pandas-datareader/issues

image

I recommend reading the message in the deprecation. It explains why yahoo doesn't work in 0.6 or earlier.

@bashtage So how to get data correctly by pandas_datareader module?

You can install master from GitHub.
On Thu, 22 Mar 2018 at 10:06 panfeng-espressif notifications@github.com
wrote:

@bashtage https://github.com/bashtage So how to get data correctly by
pandas_datareader module?


You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
https://github.com/pydata/pandas-datareader/issues/507#issuecomment-375242847,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFU5ReqiuF2QnTb8BnonVX42thZc1lvSks5tg3ejgaJpZM4SvNiN
.

Install latest development version
$ pip install git+https://github.com/pydata/pandas-datareader.git

still don't work... who could offer a solution to get yahoo finance data?

I got a solution by using this package
https://pypi.python.org/pypi/fix-yahoo-finance

from pandas_datareader import data as pdr
import datetime
import fix_yahoo_finance as yf
yf.pdr_override()

pdr.get_data_yahoo('AAPL',
start=datetime.datetime(2006, 10, 1),
end=datetime.datetime(2012, 1, 1))

I rolled back my install to version 0.5.0 and it works again. Hope it works for others.

@SecondJob That's really works for me. Thank you very much for sharing the solution.

@SutharMukesh I haven't tried your method of solving this issue. It seems that it would work effectively. I just come back to pandas_datareader version 0.5.0

Thanks! Rolling back to version 0.5 works fine.

Can anyone tell how to rollback to version 0.5.0 in idle

you can use get_data_morningstar() instead of get_data_yahoo(),it works

KeyError: 'Date' that's what I saw on the last line

conda install pandas-datareader=0.5.0

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PLAYER69 picture PLAYER69  ·  7Comments

kumaranu7 picture kumaranu7  ·  7Comments

hmz123 picture hmz123  ·  6Comments

tr4cefl0w picture tr4cefl0w  ·  3Comments

wavesailor picture wavesailor  ·  5Comments