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

Move some misc Frame methods to appropriate locations #15963

Merged
merged 6 commits into from
Jun 13, 2024

Conversation

mroeschke
Copy link
Contributor

@mroeschke mroeschke commented Jun 10, 2024

Description

  • Move Frame._is_sorted to MultiIndex._is_sorted (the only class that uses this method)
  • Move _apply_inverse_column helper function to define Column.__invert__

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 improvement Improvement / enhancement to an existing function non-breaking Non-breaking change cuDF (Python) labels Jun 10, 2024
@mroeschke mroeschke requested a review from a team as a code owner June 10, 2024 22:36
@mroeschke mroeschke requested review from wence- and isVoid June 10, 2024 22:36
@github-actions github-actions bot added the Python Affects Python cuDF API. label Jun 10, 2024
@@ -1918,6 +1873,17 @@ def __copy__(self):
@_cudf_nvtx_annotate
def __invert__(self):
"""Bitwise invert (~) for integral dtypes, logical NOT for bools."""

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we define _apply_inverse_column outside of this __invert__ separately? That way we will not keep re-defining this method when __invert__ is invoked.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You gave me the idea to define __invert__ on the Column so we can avoid this helper all together

Copy link
Contributor

@wence- wence- left a comment

Choose a reason for hiding this comment

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

Thanks!

@mroeschke
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit cb564da into rapidsai:branch-24.08 Jun 13, 2024
80 checks passed
@mroeschke mroeschke deleted the ref/frame/misc branch June 13, 2024 15:11
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
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants