ibis-ml icon indicating copy to clipboard operation
ibis-ml copied to clipboard

bug(steps): handle col with all nulls in impute

Open jitingxu1 opened this issue 8 months ago • 0 comments

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 │
└──────────┘

jitingxu1 avatar Jun 05 '24 22:06 jitingxu1