How to stop yfinance from giving me back a row with empty NaN values?
See original GitHub issueGreetings,
is there a reason why sometimes when I use a bulk download, such as
data = pdr.get_data_yahoo(tickers, start= weeks52, end=today)

I get a row of data with NaN values? I understand that yfinance only updates closing data. I have never had to deal with NaN row from yfinance so im a little bewildered.
Usually yfinance only returns back the most recent market data that is available. This hasn’t caused me any trouble in the passed except for today… I’ve also noticed that this only appears to be an issue when I download data for multiple tickers. The ticker variable above is a list of 500 stocks.
How can this be solved from my end? I know this is not too big of an issue as I can just ignore the row with NaN values. But I’m automating a program that assumes the dataframe index position for most recent data will always be the same.
Anyone else experiencing something similar?
Issue Analytics
- State:
- Created 3 years ago
- Comments:7
Top Related StackOverflow Question
This is a BUG. Nobody to fix it. Even if there is PR, it is never merged. 👎
My timezone fixes should resolve this issue, which I will personally merge in soon once it’s been sufficiently tested. https://github.com/ranaroussi/yfinance/pull/1048