-
Notifications
You must be signed in to change notification settings - Fork 48
feat: support inplace=True
in rename
and rename_axis
#1744
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
base: main
Are you sure you want to change the base?
Conversation
Edit. Done! |
Re: failures
I think I need to call Edit: this hypothesis seems to be incorrect. I don't add any system tests for inplace, only unit tests. Instead, it was the problem identified with tuples. |
@@ -411,11 +406,52 @@ def fillna(self, value=None) -> Index: | |||
ops.fillna_op.as_expr(ex.free_var("arg"), ex.const(value)) | |||
) | |||
|
|||
def rename(self, name: Union[str, Sequence[str]]) -> Index: | |||
names = [name] if isinstance(name, str) else list(name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this change to Label (Hashable) is what's breaking some MultiIndex tests. Need a better way to check if something is already a sequence / iterable and not a string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 45f9232
I think we want to support integer names, too, so instead I specifically exclude tuple from the check for hashable objects.
e2e failures:
All of these seem to be timeout related with BQML integration. I don't think it should have been caused by my changes. Presubmits are still running, but the 3.9 system tests passed. |
inplace=True
in rename
and rename_axis
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes internal issue b/329460931 🦕