mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-16 17:12:20 +08:00
Fix the index type of the multi-freq example
This commit is contained in:
@@ -11,6 +11,7 @@ class ResampleProcessor(InstProcessor):
|
|||||||
self.minute = minute
|
self.minute = minute
|
||||||
|
|
||||||
def __call__(self, df: pd.DataFrame, *args, **kwargs):
|
def __call__(self, df: pd.DataFrame, *args, **kwargs):
|
||||||
|
df.index = pd.to_datetime(df.index)
|
||||||
df = df.loc[df.index.time == datetime.time(self.hour, self.minute)]
|
df = df.loc[df.index.time == datetime.time(self.hour, self.minute)]
|
||||||
df.index = df.index.normalize()
|
df.index = df.index.normalize()
|
||||||
return df
|
return df
|
||||||
|
|||||||
Reference in New Issue
Block a user