Skip to content

Conversation

loicdiridollou
Copy link
Member

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.

To close the issue, you will have to also edit pandas-stubs/core/base.pyi as well. Basically anywhere that def factorize() appears, and then reconcile it with the docs.

@loicdiridollou
Copy link
Member Author

All should align with the docs now, let me know if anything extra is needed.

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.

can you also update core/base.pyi that has a the declaration for Index.factorize() ?

@loicdiridollou
Copy link
Member Author

loicdiridollou commented Nov 21, 2024

Aahh I see what you mean, sorry I got confused, added a test on the side, the type hinting seems a bit broad on it but that is for another day.
Now it aligns with the docs https://pandas.pydata.org/docs/reference/api/pandas.Index.factorize.html#pandas.Index.factorize

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 47fc9b6 into pandas-dev:main Nov 22, 2024
10 checks passed
@loicdiridollou loicdiridollou deleted the gh1037_na_sentinel_factorize branch December 14, 2024 19:58
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.

Removed na_sentinel argument from factorize(), Index.factorize(), and ExtensionArray.factorize()
2 participants