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

Delay materializing RangeIndex in .reset_index #15588

Merged

Conversation

mroeschke
Copy link
Contributor

Description

Before, a RangeIndex would be materialized to a Column even if it wasn't used (drop=True). Now, it's only materialized if the index will be added as a new column in the DataFrame.

Also caught a validation bug where an invalid number of levels would not raise an error

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@mroeschke mroeschke added Python Affects Python cuDF API. improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Apr 23, 2024
@mroeschke mroeschke requested a review from a team as a code owner April 23, 2024 23:21
@mroeschke mroeschke requested review from vyasr and isVoid April 23, 2024 23:21
Copy link
Contributor

@galipremsagar galipremsagar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing jumps out for me while looking at the code but @mroeschke can you look into why there are new failures in the following files:

  • tests/generic/test_finalize.py
  • tests/frame/methods/test_to_period.py
  • tests/frame/methods/test_rank.py

It might be noise but wanted to be sure if these failures are new because of this PR or not.

@mroeschke
Copy link
Contributor Author

can you look into why there are new failures in the following files:

Did you see these failures locally? Looks like the CI didn't pick up these failures

@vyasr
Copy link
Contributor

vyasr commented May 7, 2024

@galipremsagar could you comment on where you saw those failures?

@galipremsagar
Copy link
Contributor

@galipremsagar could you comment on where you saw those failures?

They were here: https://github.com/rapidsai/cudf/actions/runs/8823446932/attempts/1#summary-24226360963

But after looking at my PRs, these failures are probably un-related. So ignore my comment.

Copy link
Contributor

@vyasr vyasr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on Prem's comment above, approving assuming that my understanding in the one question that I raise is correct.

@mroeschke
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit c0c38eb into rapidsai:branch-24.06 May 8, 2024
71 checks passed
@mroeschke mroeschke deleted the ref/reset_index/ri/materialize branch May 8, 2024 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvement / enhancement to an existing function non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants