Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jitingxu1 opened this issue Jun 5, 2024 · 0 comments · Fixed by #157
Closed

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

jitingxu1 opened this issue Jun 5, 2024 · 0 comments · Fixed by #157
Assignees

Comments

@jitingxu1
Copy link
Collaborator

jitingxu1 commented Jun 5, 2024

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.

import ibis
import ibis_ml as ml
import numpy as np

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 │
└──────────┘
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant