From 6e88ccca885379ab4a816bf7137cd98dd96f1742 Mon Sep 17 00:00:00 2001 From: zhupr Date: Mon, 30 Aug 2021 18:36:38 +0800 Subject: [PATCH] Fix the index type of the multi-freq example --- examples/benchmarks/LightGBM/features_sample.py | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/benchmarks/LightGBM/features_sample.py b/examples/benchmarks/LightGBM/features_sample.py index e06637b84..72fffb79d 100644 --- a/examples/benchmarks/LightGBM/features_sample.py +++ b/examples/benchmarks/LightGBM/features_sample.py @@ -11,6 +11,7 @@ class ResampleProcessor(InstProcessor): self.minute = minute 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.index = df.index.normalize() return df