Skip to content

Commit

Permalink
Update yahoodownloader.py (#1290)
Browse files Browse the repository at this point in the history
  • Loading branch information
kano5266 authored Nov 4, 2024
1 parent 083b9dc commit 0496601
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions finrl/meta/preprocessor/yahoodownloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ def fetch_data(self, proxy=None) -> pd.DataFrame:
temp_df = yf.download(
tic, start=self.start_date, end=self.end_date, proxy=proxy
)
if temp_df.columns.nlevels != 1:
temp_df.columns = temp_df.columns.droplevel(1)
temp_df["tic"] = tic
if len(temp_df) > 0:
# data_df = data_df.append(temp_df)
Expand Down

0 comments on commit 0496601

Please sign in to comment.