1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-10 22:36:55 +08:00

add multi-freq example

This commit is contained in:
zhupr
2021-08-26 22:54:58 +08:00
committed by you-n-g
parent c99494eb76
commit 76a05f37a9
2 changed files with 92 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
import datetime
import pandas as pd
def resample_feature(df: pd.DataFrame) -> pd.DataFrame:
df = df.droplevel(level="instrument")
df = df.loc[df.index.time == datetime.time(13, 1)]
df.index = df.index.normalize()
return df