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] repr failing silently when IntervalIndex with null values is rendered #13954

Closed
galipremsagar opened this issue Aug 25, 2023 · 0 comments · Fixed by #13958
Closed

[BUG] repr failing silently when IntervalIndex with null values is rendered #13954

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

Comments

@galipremsagar
Copy link
Contributor

Describe the bug
When an IntervalIndex with null values is rendered with the help of repr, it silently fails.

Steps/Code to reproduce bug

In [14]: import numpy as np

In [15]: from pandas._libs.interval import Interval

In [16]: import pandas as pd

In [17]: import cudf

In [18]: x = [np.nan, Interval(2.0, 3.0, closed='right'), Interval(3.0, 4.0, closed='right')]

In [19]: pi = pd.Index(x)

In [20]: gi = cudf.from_pandas(pi)

In [21]: gi
Out[21]: 
In [22]: 

Expected behavior

In [22]: gi
Out[22]: IntervalIndex([nan, (2.0, 3.0], (3.0, 4.0]], dtype='interval[float64, right]')

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
…13958)

closes #13954 

This PR fixes an issue with `IntervalIndex.repr`, where there was a silent failure because of no dedicated `_clean_nulls_from_index` and the `GenericIndex._clean_nulls_from_index` wouldn't work because a type-cast to `str` isn't implemented.

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

Approvers:
  - Matthew Roeschke (https://github.com/mroeschke)

URL: #13958
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