Skip to content

Commit ac1d090

Browse files
authored
Merge pull request #1865 from cottrell/fix
Fix some errors.
2 parents 683064f + afb4e0d commit ac1d090

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

yfinance/scrapers/history.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -852,6 +852,7 @@ def _fix_unit_random_mixups(self, df, interval, tz_exchange, prepost):
852852
if f_zeroes.any():
853853
df2_zeroes = df2[f_zeroes]
854854
df2 = df2[~f_zeroes]
855+
df = df[~f_zeroes] # all row slicing must be applied to both df and df2
855856
else:
856857
df2_zeroes = None
857858
if df2.shape[0] <= 1:
@@ -958,7 +959,7 @@ def _fix_unit_random_mixups(self, df, interval, tz_exchange, prepost):
958959
if "Repaired?" not in df2_zeroes.columns:
959960
df2_zeroes["Repaired?"] = False
960961
df2 = pd.concat([df2, df2_zeroes]).sort_index()
961-
df2.index = pd.to_datetime()
962+
df2.index = pd.to_datetime(df2.index)
962963

963964
return df2
964965

0 commit comments

Comments
 (0)