diff --git a/pts/feature/time_feature.py b/pts/feature/time_feature.py index f3b7793..cc9cec9 100644 --- a/pts/feature/time_feature.py +++ b/pts/feature/time_feature.py @@ -112,9 +112,9 @@ class WeekOfYear(TimeFeature): def __call__(self, index: pd.DatetimeIndex) -> np.ndarray: if self.normalized: - return index.weekofyear / 51.0 - 0.5 + return pd.Int64Index(index.isocalendar().week) / 51.0 - 0.5 else: - return index.weekofyear.map(float) + return pd.Int64Index(index.isocalendar().week).map(float) class FourierDateFeatures(TimeFeature): diff --git a/setup.py b/setup.py index d1efe16..7435167 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ setup( 'torch>=1.5.0', 'holidays', 'numpy', - 'pandas>=1.0,<1.1', + 'pandas>=1.1', 'scipy', 'tqdm', 'pydantic',