-
Notifications
You must be signed in to change notification settings - Fork 902
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] replace
fails with RuntimeError
when to_replace
is None.
#7293
Comments
|
@davidwendt I think the desire is to replace a value with a null, not replacing a null with a value. |
This issue has been labeled |
From the description it looks like replacing a value with a null already works.
|
Thanks @davidwendt , this is what is needed for scalar replace. Apologies for the confusion created by me. Update for column-like replace: Connected offline and decided we'll do a two-pass approach if we have nulls in |
This issue has been labeled |
Fixes: #7293 This PR introduces fixes to `replace` and it's internal APIs which error/fault when there is a `None`/`<NA>` value on either `lhs` or `rhs` and certain combinations of each. Introduced tests where there were failures previously that are covered by new changes in this PR. Authors: - GALI PREM SAGAR (https://github.com/galipremsagar) Approvers: - Michael Wang (https://github.com/isVoid) URL: #8744
Describe the bug
Using
replace
API we can currently replace any value of a column with<NA>
but not vice-versa.Steps/Code to reproduce bug
Expected behavior
Ideally I'd expect libcudf to replace
None
with'a'
, but is this because of a design limitation or would it be possible to relax this requirement from libcudf side and only error when there are multipleNone
values invalues_to_replace
?or
we could do a
fillna
at python level when thenull_count
is 1. and throw whennull_count
>1. But this would be a two-pass solution as we'd be doingfillna
+replace
.Environment overview (please complete the following information)
Environment details
Please run and paste the output of the
cudf/print_env.sh
script here, to gather any other relevant environment detailsClick here to see environment details
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: