Imputer modifies user data when user passes in a DataTable
- Lingua principale
- Python
- Stelle
- 850
- Fork
- 96
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
```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.
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.