1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-05 20:11:08 +08:00
Files
qlib/examples/benchmarks/LightGBM/features_sample.py
2021-09-07 20:41:10 +08:00

10 lines
241 B
Python

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