Skip to content

Commit

Permalink
Merge pull request #2122 from ranaroussi/hotfix/prices-missing-latest…
Browse files Browse the repository at this point in the history
…-day

Fix prices-clean discarding both duplicate last rows instead of 1/2
  • Loading branch information
ValueRaider authored Nov 10, 2024
2 parents f05f99c + e077a2b commit bc52389
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yfinance/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bc52389

Please sign in to comment.