ibis-ml
ibis-ml copied to clipboard
bug(steps): handle col with all nulls in impute
For all the impute, we need to handle cols with all nulls. We need to tell the user the column is all nulls by failing the imputing or throw warnings.
I prefer fail
the impute.
a = ibis.memtable(
{"all_null": np.array([np.nan, np.nan, np.nan], dtype="float64")}
)
step = ml.ImputeMean(ml.numeric())
step.fit_table(a, ml.core.Metadata())
step.transform_table(a)
┏━━━━━━━━━━┓
┃ all_null ┃
┡━━━━━━━━━━┩
│ float64 │
├──────────┤
│ nan │
│ nan │
│ nan │
└──────────┘