pydata / pandas-datareader

Extract data from a wide range of Internet sources into a pandas DataFrame.
https://pydata.github.io/pandas-datareader/stable/index.html
Other
2.94k stars 682 forks source link

pandas_datareader.data.DataReader can no longer access stooq #955

Open charizardavi opened 1 year ago

charizardavi commented 1 year ago

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.

charizardavi commented 1 year ago

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

mindtd commented 1 year ago

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()

raphi6 commented 1 year ago

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 :)

Goonie5 commented 1 year ago

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: []