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

Index.rename() should return Self #935

Open
Dr-Irv opened this issue May 29, 2024 · 3 comments
Open

Index.rename() should return Self #935

Dr-Irv opened this issue May 29, 2024 · 3 comments
Assignees
Labels
good first issue Index Related to the Index class or subclasses rename

Comments

@Dr-Irv
Copy link
Collaborator

Dr-Irv commented May 29, 2024

Describe the bug
Index.rename() should return Self

To Reproduce

import pandas as pd

ind = pd.Index([1,2,3], name="foo")
ind2 = ind.rename("goo")
reveal_type(ind2)

shows that ind2 is unknown

Please complete the following information:

  • OS: Windows 10
  • OS Version ??
  • python version 3.9
  • version of type checker pyright 1.1.362
  • version of installed pandas-stubs : 2.2.2.240514
@Dr-Irv
Copy link
Collaborator Author

Dr-Irv commented May 29, 2024

Need to fix rename() in core/indexes/base.pyi

@Dr-Irv Dr-Irv added good first issue Index Related to the Index class or subclasses rename labels May 29, 2024
@devesh-2002
Copy link
Contributor

May I take up this issue?

@Dr-Irv
Copy link
Collaborator Author

Dr-Irv commented May 30, 2024

May I take up this issue?

Assigned to you. go ahead. Need a fix and a test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Index Related to the Index class or subclasses rename
Projects
None yet
Development

No branches or pull requests

2 participants