Skip to content

Commit b7d0ab8

Browse files
use docstring from base class
1 parent c53a3c2 commit b7d0ab8

File tree

1 file changed

+2
-23
lines changed

1 file changed

+2
-23
lines changed

pandas/core/arrays/string_arrow.py

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import numpy as np
77

88
from pandas._libs import lib, missing as libmissing
9+
from pandas.util._decorators import doc
910
from pandas.util._validators import validate_fillna_kwargs
1011

1112
from pandas.core.dtypes.base import ExtensionDtype
@@ -254,30 +255,8 @@ def __len__(self) -> int:
254255
"""
255256
return len(self._data)
256257

258+
@doc(ExtensionArray.factorize)
257259
def factorize(self, na_sentinel: int = -1) -> Tuple[np.ndarray, ExtensionArray]:
258-
"""Encode the extension array as an enumerated type.
259-
Parameters
260-
----------
261-
na_sentinel : int, default -1
262-
Value to use in the `labels` array to indicate missing values.
263-
Returns
264-
-------
265-
labels : ndarray
266-
An integer NumPy array that's an indexer into the original
267-
ExtensionArray.
268-
uniques : ExtensionArray
269-
An ExtensionArray containing the unique values of `self`.
270-
.. note::
271-
uniques will *not* contain an entry for the NA value of
272-
the ExtensionArray if there are any missing values present
273-
in `self`.
274-
See Also
275-
--------
276-
pandas.factorize : Top-level factorize method that dispatches here.
277-
Notes
278-
-----
279-
:meth:`pandas.factorize` offers a `sort` keyword as well.
280-
"""
281260
if pa.types.is_dictionary(self._data.type):
282261
raise NotImplementedError()
283262
elif self._data.num_chunks == 1:

0 commit comments

Comments
 (0)