From e077a2b50c6f3f6b90343f857fe2eca35e88dc2d Mon Sep 17 00:00:00 2001 From: ValueRaider Date: Sun, 10 Nov 2024 11:08:54 +0000 Subject: [PATCH] Fix prices-clean discarding both duplicate last rows instead of 1/2 --- yfinance/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yfinance/utils.py b/yfinance/utils.py index 0968f9d1..ebc8b99a 100644 --- a/yfinance/utils.py +++ b/yfinance/utils.py @@ -613,7 +613,7 @@ def fix_Yahoo_returning_live_separate(quotes, interval, tz_exchange, repair=Fals # - exception is volume, *slightly* greater on final row (and matches website) if dt1.date() == dt2.date(): # Last two rows are on same day. Drop second-to-last row - quotes = quotes.drop(quotes.index[n - 2]) + quotes = _pd.concat([quotes.iloc[:-2], quotes.iloc[-1:]]) else: if interval == "1wk": last_rows_same_interval = dt1.year == dt2.year and dt1.week == dt2.week