pydata / pandas-datareader

Extract data from a wide range of Internet sources into a pandas DataFrame.

Home Page:https://pydata.github.io/pandas-datareader/stable/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pandas_datareader.data.DataReader can no longer access stooq

charizardavi opened this issue · comments

As of 9:30 or so EST on 12/25, the DataReader method could not retrieve data from stooq. It returned a blank dataframe. Is there any other option for getting the same data formatted similarly? I have also tested pandas_datareader.get_data_stooq, and this method does not seem to work either.

Update: I am now using the pandas_datareader.get_data_tiingo method, which is working as intended.

commented

Observation - I am able to use stooq to read data (when yahoo returns error). Noted that stock, like 2222.SR Saudi Aramco will return empty df because cannot be found in stooq (check symbol https://stooq.com/db/h/). Quick fix is to add dropna() after getting the stooq df.

import pandas_datareader.data as web

data = web.DataReader(tickers, "stooq", start, end)['Close']
data = data.dropna()

commented

Update: I am now using the pandas_datareader.get_data_tiingo method, which is working as intended.

This also might be fixed by PR #953
If you could test it out by locally installing my version of the fix that would greatly help :)

I experienced the same issue today. Retrieves an empty DataFrame. Tried dropna() and it didn't solve for me.

import pandas_datareader.data as web
data = web.DataReader('AAPL', 'stooq')
print (data)

Empty DataFrame
Columns: []
Index: []