Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 3 additions & 2 deletions pandas-stubs/core/arrays/base.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ 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, sort: bool = ..., use_na_sentinel: bool = ...
) -> tuple[np.ndarray, Self]: ...
def repeat(self, repeats, axis=...): ...
def take(
self,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ def test_lreshape() -> None:


def test_factorize() -> None:
codes, uniques = pd.factorize(np.array(["b", "b", "a", "c", "b"]))
codes, uniques = pd.factorize(np.array(["b", "b", "a", "c", "b"]), sort=False)
check(assert_type(codes, np.ndarray), np.ndarray)
check(assert_type(uniques, np.ndarray), np.ndarray)

Expand Down
Loading