alteryx / alteryx/evalml

Imputer modifies user data when user passes in a DataTable

未关闭
#2,055 3 条评论 2 个 reaction 已指派 1 人 已被 @asniyaz 认领 在 GitHub 查看
bug
主要语言
Python
星标
850
派生
96
PR 合并指标
30 天内没有已合并 PR

描述

```python
import woodwork as ww
import pandas as pd
import numpy as np
from evalml.pipelines.components import Imputer
df = ww.DataTable(pd.DataFrame({
"all nan": [np.nan, np.nan, np.nan, np.nan, np.nan],
"all nan cat": pd.Series([np.nan, np.nan, np.nan, np.nan, np.nan], dtype='category')
}))
X = Imputer().fit_transform(df)
assert df.to_dataframe().empty
```

This came up during #2018 . The imputer is expected to drop all null columns but, as a user, I wouldn't expect the `Imputer` to modify the data pass in.

The underlying issue is that [infer_feature_types](https://github.com/alteryx/evalml/blob/main/evalml/utils/woodwork_utils.py#L26) does not copy the data when users pass in a data table.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。