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

GH1037 Remove na_sentinel from factorize methods #1038

Merged
merged 5 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions pandas-stubs/core/algorithms.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,13 @@ def factorize(
def factorize(
values: Index | Series,
sort: bool = ...,
# Not actually positional-only, used to handle deprecations in 1.5.0
*,
use_na_sentinel: bool = ...,
size_hint: int | None = ...,
) -> tuple[np.ndarray, Index]: ...
@overload
def factorize(
values: Categorical,
sort: bool = ...,
# Not actually positional-only, used to handle deprecations in 1.5.0
*,
use_na_sentinel: bool = ...,
size_hint: int | None = ...,
) -> tuple[np.ndarray, Categorical]: ...
Expand Down
3 changes: 1 addition & 2 deletions pandas-stubs/core/arrays/base.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ class ExtensionArray:
def shift(self, periods: int = ..., fill_value: object = ...) -> Self: ...
def unique(self): ...
def searchsorted(self, value, side: str = ..., sorter=...): ...
# TODO: remove keyword-only when pandas removed na_sentinel
def factorize(self, *, use_na_sentinel: bool = ...) -> tuple[np.ndarray, Self]: ...
def factorize(self, use_na_sentinel: bool = ...) -> tuple[np.ndarray, Self]: ...
def repeat(self, repeats, axis=...): ...
def take(
self,
Expand Down
Loading