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:
9
examples/benchmarks/LightGBM/features_sample.py
Normal file
9
examples/benchmarks/LightGBM/features_sample.py
Normal 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
|
||||
Reference in New Issue
Block a user