alteryx / alteryx/featuretools

RollingMean: index values must not have NaT

オープン
#2,768 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
Python
スター
7.7k
フォーク
915
PR マージ指標
30日以内にマージされた PR はありません

説明

[RollingMean: index values must not have NaT]

#### Code Sample, a copy-pastable example to reproduce your bug.

```python
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()``

Image

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

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。