-
Notifications
You must be signed in to change notification settings - Fork 904
Open
Labels
bugSomething isn't workingSomething isn't working
Description
[RollingMean: index values must not have NaT]
Code Sample, a copy-pastable example to reproduce your bug.
def rolling_mean(datetime, numeric):
x = pd.Series(numeric.values, index=datetime.values)
return apply_rolling_agg_to_series(
x,
np.mean,
self.window_length,
self.gap,
self.min_periods,
)
======datetime======
0 2023-06-18
1 2023-06-18
2 2023-06-18
3 2023-06-18
4 NaT --> the value [2023-06-19] was set to NaT when the rolling date is 2023-06-18
...
77246 NaT
77247 NaT
77248 NaT
77249 NaT
77250 NaT
Name: wh_item_day_train.day_dt, Length: 77251, dtype: datetime64[ns]
Output of featuretools.show_info()

File "..\lib\site-packages\featuretools\computational_backends\feature_set_calculator.py", line 511, in _calculate_transform_features
values = feature_func(*column_data)
File "..\lib\site-packages\featuretools\primitives\standard\transform\time_series\rolling_mean.py", line 97, in rolling_mean
return apply_rolling_agg_to_series(
File "..\lib\site-packages\featuretools\primitives\standard\transform\time_series\utils.py", line 224, in apply_rolling_agg_to_series
rolled_series = roll_series_with_gap(series, window_length, gap, min_periods)
File "..\lib\site-packages\featuretools\primitives\standard\transform\time_series\utils.py", line 58, in roll_series_with_gap
return series.rolling(functional_window_length, min_periods)
ValueError: index values must not have NaT
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working