Skip to content

Commit

Permalink
drop warning during code runs
Browse files Browse the repository at this point in the history
  • Loading branch information
SunsetWolf committed Oct 27, 2023
1 parent 0fdcb97 commit fe8c4bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/data_collector/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ def _calc_factor(df_1d: pd.DataFrame):
df_1d["paused"] = np.nan
return df_1d

df = df.groupby([df[_date_field_name].dt.date]).apply(_calc_factor)
df = df.groupby([df[_date_field_name].dt.date], group_keys=False).apply(_calc_factor)
if consistent_1d:
# the date sequence is consistent with 1d
df.set_index(_date_field_name, inplace=True)
Expand Down
2 changes: 1 addition & 1 deletion scripts/data_collector/yahoo/collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,7 @@ def update_data_to_bin(

# start/end date
calendar_df = pd.read_csv(Path(qlib_data_1d_dir).joinpath("calendars/day.txt"))
trading_date = (pd.Timestamp(calendar_df.iloc[-1, 0]) - pd.Timedelta(days=2)).strftime("%Y-%m-%d")
trading_date = (pd.Timestamp(calendar_df.iloc[-1, 0]) - pd.Timedelta(days=1)).strftime("%Y-%m-%d")

if end_date is None:
end_date = (pd.Timestamp(trading_date) + pd.Timedelta(days=1)).strftime("%Y-%m-%d")
Expand Down

0 comments on commit fe8c4bc

Please sign in to comment.