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

GH935 Create overload for pd.Index.rename #1012

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

loicdiridollou
Copy link
Contributor

"""Test that index rename in-place does not return anything (None)."""
ind = pd.Index([1, 2, 3], name="foo")
ind2 = ind.rename("goo", inplace=True)
check(assert_type(ind2, None), type(None))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not totally sure about the structure when there is a None return, will double check with another example from the code.

Copy link
Collaborator

@Dr-Irv Dr-Irv left a comment

Choose a reason for hiding this comment

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

@Dr-Irv Dr-Irv merged commit 668292f into pandas-dev:main Oct 8, 2024
10 checks passed
@loicdiridollou loicdiridollou deleted the gh935_index_rename branch October 9, 2024 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Index.rename() should return Self
2 participants