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

[BUG] IntervalIndex.unique is resulting in an incomplete due to lack of post-processing #13953

Closed
galipremsagar opened this issue Aug 25, 2023 · 0 comments · Fixed by #13957
Closed
Assignees
Labels
bug Something isn't working Python Affects Python cuDF API.

Comments

@galipremsagar
Copy link
Contributor

Describe the bug
Calling unique on an IntervalColumn(which is a StructColumn) is resulting in incomplete creation of the actual IntervalColumn, thus leaving out the StructColumn as is.

Steps/Code to reproduce bug

In [10]: i = cudf.IntervalIndex.from_breaks([0, 1, 2, 3])

In [11]: i
Out[11]: IntervalIndex([(0, 1], (1, 2], (2, 3]], dtype='interval')

In [12]: i.unique()
Out[12]: IntervalIndex([{'0': 0, '1': 1}, {'0': 1, '1': 2}, {'0': 2, '1': 3}], dtype='struct')

Expected behavior

In [11]: i.unique()
Out[11]: IntervalIndex([(0, 1], (1, 2], (2, 3]], dtype='interval')

Environment overview (please complete the following information)

  • Environment location: [Bare-metal]
  • Method of cuDF install: [from source]
@galipremsagar galipremsagar added bug Something isn't working Python Affects Python cuDF API. labels Aug 25, 2023
@galipremsagar galipremsagar self-assigned this Aug 25, 2023
rapids-bot bot pushed a commit that referenced this issue Aug 25, 2023
closes #13953 

This PR fixes an issue with `Column.unique` where the type-metadata wasn't being preserved in the end before returning the unique values. This lead to `IntervalColumn` being returned as a `StructColumn`.

Authors:
  - GALI PREM SAGAR (https://github.com/galipremsagar)

Approvers:
  - https://github.com/brandon-b-miller

URL: #13957
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant