Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pandas DataReader

This may be a really simple question but I am truly stuck. I am trying to call Pandas' DataReader like:

from pandas.io.date import DataReader

but it does not get DataReader. I do not know what I am doing wrong, especially for such a simple thing. All I am trying to do is to acquire data from Yahoo Finance.

Thanks a lot for the help.

like image 733
Bruno Avatar asked Dec 04 '25 14:12

Bruno


1 Answers

Pandas data reader was removed from pandas, it is now a separate repo and a separate install

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

From the readme.

Starting in 0.19.0, pandas no longer supports pandas.io.data or pandas.io.wb, so you must replace your imports from pandas.io with those from pandas_datareader:

from pandas.io import data, wb # becomes
from pandas_datareader import data, wb

Many functions from the data module have been included in the top level API.

import pandas_datareader as pdr
pdr.get_data_yahoo('AAPL')
like image 139
zhqiat Avatar answered Dec 06 '25 09:12

zhqiat



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!