h2oai / h2oai/datatable

unique(DT) works unexpectedly when DT has multiple columns

Open
#2,088 2 comments 0 reactions 0 assignees View on GitHub
consistency improve
Dominant language
C++
Stars
1.9k
Forks
164
Avg merge
7h 31m
Merged PRs (30d)
1

Description

Example:

```
import datatable as dt
from datatable import f
import numpy as np

np.random.seed(1)
foo = dt.Frame({'x': [10,10,11,11], 'y': [10,10,11,11], 'z': [10,11,12,13]})

foo
x y z
-- -- -- --
0 10 10 10
1 10 10 11
2 11 11 12
3 11 11 13

dt.unique(foo)
C0
-- --
0 10
1 11
2 12
3 13

dt.unique(foo[:, (f.x, f.y)])
C0
-- --
0 10
1 11
```

For some reason, each result is a table with one column. Would've expected the results to have the same number of columns as the inputs (2 and 3 columns), just like R's data.table behaves.

Note that I'm using datatable v 0.9.0 on Python 3.7.4. Thanks!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.