From 7c52b7b51f854140033d6fa8a76a444f761c1639 Mon Sep 17 00:00:00 2001 From: ScottSauers <123714540+ScottSauers@users.noreply.github.com> Date: Tue, 2 Apr 2024 13:10:25 -0500 Subject: [PATCH 1/2] Update __init__.py --- yahooquery/utils/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yahooquery/utils/__init__.py b/yahooquery/utils/__init__.py index 8fad8ac..52cb64d 100644 --- a/yahooquery/utils/__init__.py +++ b/yahooquery/utils/__init__.py @@ -1467,7 +1467,7 @@ def _get_daily_index(data, index_utc, adj_timezone): has_live_indice = False else: last_trade = pd.Timestamp.fromtimestamp(timestamp, tz="UTC") - has_live_indice = index_utc[-1] >= last_trade - pd.Timedelta(2, "S") + has_live_indice = index_utc[-1] >= last_trade - pd.Timedelta(2, "s") if has_live_indice: # remove it live_indice = index_utc[-1] From 10099d9e1c58ab5610bebd893caf2b5ab395b0ae Mon Sep 17 00:00:00 2001 From: ScottSauers <123714540+ScottSauers@users.noreply.github.com> Date: Tue, 2 Apr 2024 13:19:25 -0500 Subject: [PATCH 2/2] Update ticker.py --- yahooquery/ticker.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yahooquery/ticker.py b/yahooquery/ticker.py index 37cb549..454928a 100644 --- a/yahooquery/ticker.py +++ b/yahooquery/ticker.py @@ -1330,9 +1330,9 @@ def _historical_data_to_dataframe(self, data, params, adj_timezone): df = pd.DataFrame(columns=["high", "low", "volume", "open", "close"]) else: if "dividends" in df.columns: - df["dividends"].fillna(0, inplace=True) + df["dividends"] = df["dividends"].fillna(0) if "splits" in df.columns: - df["splits"].fillna(0, inplace=True) + df["splits"] = df["splits"].fillna(0) return df def _adjust_ohlc(self, df):