Search code examples
pythonpandas-datareader

Pandas DataReader is no longer working with the Yahoo Finance API?


I guess this issue just arose recently. On my regular PC I have an older version of pandas_datareader which works fine, but on my instance I had to install the newer version and it doesn't work. It has the following error-

Yahoo Daily 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.

Can I install an earlier version somehow? How do I get around this using code like the following?

import pandas_datareader as web
import datetime

co = web.DataReader("AAPL", "yahoo", datetime.date.today() - datetime.timedelta(days=10), datetime.date.today())

print co.head()

Solution

  • Just go to the PyPi of pandas_datareader, download the tar.gz file (wget <url to tar.gz file for 0.5.0>) and type pip install blahblah.tar.gz.