Skip to content

Commit 8955762

Browse files
committed
Fix rank method with nullable int
1 parent c8fadb9 commit 8955762

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pandas/core/arrays/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2206,7 +2206,7 @@ def _rank(
22062206
raise NotImplementedError
22072207

22082208
return rank(
2209-
self._values_for_argsort(),
2209+
self,
22102210
axis=axis,
22112211
method=method,
22122212
na_option=na_option,

pandas/core/arrays/masked.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1057,8 +1057,8 @@ def factorize(
10571057
return codes, uniques_ea
10581058

10591059
@doc(ExtensionArray._values_for_argsort)
1060-
def _values_for_argsort(self) -> np.ndarray:
1061-
return type(self)(self._data, self._mask)
1060+
def _values_for_argsort(self) -> Self:
1061+
return self._data
10621062

10631063
def value_counts(self, dropna: bool = True) -> Series:
10641064
"""

0 commit comments

Comments
 (0)