Skip to content

Commit 87ea29a

Browse files
committed
Fix some errors.
1 parent 1d31e7c commit 87ea29a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

yfinance/base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -868,6 +868,7 @@ def _fix_unit_random_mixups(self, df, interval, tz_exchange, prepost):
868868
if f_zeroes.any():
869869
df2_zeroes = df2[f_zeroes]
870870
df2 = df2[~f_zeroes]
871+
df = df[~f_zeroes] # all row slicing must be applied to both df and df2
871872
else:
872873
df2_zeroes = None
873874
if df2.shape[0] <= 1:
@@ -974,7 +975,7 @@ def _fix_unit_random_mixups(self, df, interval, tz_exchange, prepost):
974975
if "Repaired?" not in df2_zeroes.columns:
975976
df2_zeroes["Repaired?"] = False
976977
df2 = pd.concat([df2, df2_zeroes]).sort_index()
977-
df2.index = pd.to_datetime()
978+
df2.index = pd.to_datetime(df2.index)
978979

979980
return df2
980981

0 commit comments

Comments
 (0)