`.replace()` behavior on `void` columns

Open
#3,262 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp, python
Domain
data

Research direction

Start at the .replace() entry point and compare its handling of void columns with the documented behavior for replace_what values. Reproduce the example using dt.Frame([None]) and DT.replace(None, 1). Done means replacing the missing value changes the void column as expected.

Written by the indexing model from the issue text.

Description

bug

.replace() should operate on columns of types appropriate for the replace_what value. At the same time, we declare that void columns can be used in place where any other type could be expected. However, it is not the case for .replace() and replacing missing value with anything doesn't work for void columns:

>>> import datatable as dt
>>> DT = dt.Frame([None])
>>> DT.replace(None, 1)
>>> DT
   |   C0
   | void
-- + ----
 0 |   NA
[1 row x 1 column]
Dominant language
C++
Stars
1.9k
Forks
164
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from h2oai/datatable

All issues in h2oai/datatable

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.