Skip to content

Commit

Permalink
optimize code
Browse files Browse the repository at this point in the history
  • Loading branch information
SunsetWolf committed Nov 10, 2023
1 parent 0dba040 commit 6a95c86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/data_collector/yahoo/collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,8 @@ def normalize_yahoo(
df = df.copy()
df.set_index(date_field_name, inplace=True)
df.index = pd.to_datetime(df.index)
df.index = df.index.tz_localize(None)
df = df[~df.index.duplicated(keep="first")]
calendar_list = calendar_list.tz_localize("Asia/Shanghai")
if calendar_list is not None:
df = df.reindex(
pd.DataFrame(index=calendar_list)
Expand Down

0 comments on commit 6a95c86

Please sign in to comment.