yfinance
yfinance copied to clipboard
Add 'keepna' argument
Keeping NaNs rows returned by Yahoo may be useful because the timepoints are still valid so provides list of trading intervals.
New argument keepna=False
controls whether to keep/drop these NaN rows.
#1028 relevant
This is breaking 30m, let me fix ...
False alarm. 15m and 30m prices looking good.
Might be good to include the following line in the impacted drop calls: https://github.com/ranaroussi/yfinance/blob/ec6279736b570815ec017691b428c90d910b1739/yfinance/base.py#L320
Might be good to include the following line in the impacted drop calls:
https://github.com/ranaroussi/yfinance/blob/ec6279736b570815ec017691b428c90d910b1739/yfinance/base.py#L320
It should stay. Because how='all'
is specified, then only if all columns are NaN are rows dropped. But ["Volume","Dividends","Stocks Splits"] should have their NaNs replaced with 0, so only with a yfinance bug would rows be dropped. We want to keep Yahoo NaNs, not buggy yfinance NaNs.