[BUG] replace does not work on date columns
@pradkrish is already working on this.
Since Oct 13, 2021.
Assessment
This issue has not been assessed yet.
Description
-
Did you find a bug in datatable, or maybe the bug found you?
The replace function does not work on date columns; no change is effected. -
How to reproduce the bug?
source = {"dates" : [date(2000, 1, 5), date(2010, 11, 23), date(2020, 2, 29), None],
"integers" : range(1, 5),
"floats" : [10.0, 11.5, 12.3, -13],
"strings" : ['A', 'B', None, 'D']
}
DT = dt.Frame(source)
DT
| dates integers floats strings
| date32 int32 float64 str32
-- + ---------- -------- ------- -------
0 | 2000-01-05 1 10 A
1 | 2010-11-23 2 11.5 B
2 | 2020-02-29 3 12.3 NA
3 | NA 4 -13 D
[4 rows x 4 columns]
DT.replace(date(2000, 1, 5), date(2999, 12, 31))
DT
| dates integers floats strings
| date32 int32 float64 str32
-- + ---------- -------- ------- -------
0 | 2000-01-05 1 10 A # the date does not change
1 | 2010-11-23 2 11.5 B
2 | 2020-02-29 3 12.3 NA
3 | NA 4 -13 D
- What was the expected behavior?
DT
| dates integers floats strings
| date32 int32 float64 str32
-- + ---------- -------- ------- -------
0 | 2999-12-31 1 10 A # expected change
1 | 2010-11-23 2 11.5 B
2 | 2020-02-29 3 12.3 NA
3 | NA 4 -13 D
- Your environment?
datatable version 1.1
python version 3.9
Linux
- Dominant language
- C++
- Stars
- 1.9k
- Forks
- 164
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from h2oai/datatable
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
deepseek-ai/DeepGEMM-Ascend#49 ·
Maintainers usually reply within 1 day
-
bug needs testing platform:windows topic:buildsystem topic:platforms
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
godotengine/godot#126110 · 1 comment ·
Maintainers usually reply within 1 day
-
comp-s3queue
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
ClickHouse/ClickHouse#137649 ·
Maintainers usually reply within 1 day
-
area/docdb kind/enhancement mvu-pg15-pg19 priority/low
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
yugabyte/yugabyte-db#40355 ·
Maintainers usually reply within 1 day
-
Clear params.inputs in dials.indexPossibly taken @phyy-nx claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
dials/dials#3361 · 1 comment ·
Maintainers usually reply within 1 day