Imputer modifies user data when user passes in a DataTable
- Langage dominant
- Python
- Étoiles
- 850
- Forks
- 96
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
```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.
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.