Imputer modifies user data when user passes in a DataTable
- Vorherrschende Sprache
- Python
- Sterne
- 850
- Forks
- 96
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
```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.
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.