Skip to content

[BUG] pandas incompatibility 2.0.3 #1728

@moghadas76

Description

@moghadas76

File ~/miniconda3/envs/env/lib/python3.11/site-packages/pytorch_forecasting/data/timeseries.py:490, in TimeSeriesDataSet.init..(x)
486 # filter data
487 if min_prediction_idx is not None:
488 # filtering for min_prediction_idx will be done on subsequence level ensuring
489 # minimal decoder index is always >= min_prediction_idx
--> 490 data = data[lambda x: x[self.time_idx] >= self.min_prediction_idx - self.max_encoder_length - self.max_lag]
491 data = data.sort_values(self.group_ids + [self.time_idx])
493 # preprocess data

File ~/miniconda3/envs/env/lib/python3.11/site-packages/pandas/_libs/tslibs/timestamps.pyx:493, in pandas._libs.tslibs.timestamps._Timestamp.sub()

File ~/miniconda3/envs/env/lib/python3.11/site-packages/pandas/_libs/tslibs/timestamps.pyx:461, in pandas._libs.tslibs.timestamps._Timestamp.add()

TypeError: Addition/subtraction of integers and integer-arrays with Timestamp is no longer supported. Instead of adding/subtracting n, use n * obj.freq

pandas 2.0.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Reproducing/confirming

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions