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

Replacing NA strings in a column #2502

Closed
st-pasha opened this issue Jun 27, 2020 · 0 comments · Fixed by #2508
Closed

Replacing NA strings in a column #2502

st-pasha opened this issue Jun 27, 2020 · 0 comments · Fixed by #2508
Assignees
Labels
bug Any bugs / errors in datatable; however for severe bugs use [segfault] label

Comments

@st-pasha
Copy link
Contributor

st-pasha commented Jun 27, 2020

When NA strings are replaced in a column, all empty strings get replaced too

import datatable as dt
DT = dt.Frame(A=["foo", "", None, "bar"])
DT.replace(None, "buzz")
print(DT.to_list())

# Produces:
# [['foo', 'buzz', 'buzz', 'bar']]

# Expected:
# [['foo', '', 'buzz', 'bar']]
@st-pasha st-pasha self-assigned this Jun 27, 2020
@st-pasha st-pasha added the bug Any bugs / errors in datatable; however for severe bugs use [segfault] label label Jun 27, 2020
@st-pasha st-pasha added this to To do in Sprint Jun 15 - Jul 5 via automation Jun 27, 2020
@st-pasha st-pasha added this to the Release 0.11.0 milestone Jun 27, 2020
@st-pasha st-pasha changed the title Replacing NA strings all replaces all empty strings Replacing NA strings in a column Jun 27, 2020
Sprint Jun 15 - Jul 5 automation moved this from To do to Done Jun 30, 2020
st-pasha added a commit that referenced this issue Jun 30, 2020
- class `CString` moved into file "cstring.h" / "cstring.cc";
- class `CString` moved into the `dt::` namespace;
- all constructors in `CString` are now explicit;
- fields `.ch` and `.size` are now private;
- field `.size` changed into `size_t` instead of `int64_t`;
- fixed a bug with replacing NA strings in function `replace()` (#2502);

Closes #2502
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Any bugs / errors in datatable; however for severe bugs use [segfault] label
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

1 participant