feat: support inplace=True in rename and rename_axis#1744
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. |
| ) | ||
|
|
||
| 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.
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.
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 🦕