diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 9806e7177c9b9..905c2d0df9065 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -373,11 +373,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.Timestamp.weekday SA01" \ -i "pandas.Timestamp.weekofyear SA01" \ -i "pandas.Timestamp.year GL08" \ - -i "pandas.api.extensions.ExtensionArray SA01" \ - -i "pandas.api.extensions.ExtensionArray._accumulate RT03,SA01" \ - -i "pandas.api.extensions.ExtensionArray._concat_same_type PR07,SA01" \ - -i "pandas.api.extensions.ExtensionArray._formatter SA01" \ - -i "pandas.api.extensions.ExtensionArray._from_sequence SA01" \ -i "pandas.api.extensions.ExtensionArray._from_sequence_of_strings SA01" \ -i "pandas.api.extensions.ExtensionArray._hash_pandas_object RT03,SA01" \ -i "pandas.api.extensions.ExtensionArray._pad_or_backfill PR01,RT03,SA01" \ diff --git a/pandas/core/arrays/base.py b/pandas/core/arrays/base.py index 8a2856d0a7e64..e363c5380a8e7 100644 --- a/pandas/core/arrays/base.py +++ b/pandas/core/arrays/base.py @@ -158,6 +158,12 @@ class ExtensionArray: _values_for_argsort _values_for_factorize + See Also + -------- + api.extensions.ExtensionDtype : A custom data type, to be paired with an + ExtensionArray. + api.extensions.ExtensionArray.dtype : An instance of ExtensionDtype. + Notes ----- The interface includes the following abstract methods that must be @@ -289,6 +295,13 @@ def _from_sequence( ------- ExtensionArray + See Also + -------- + api.extensions.ExtensionArray._from_sequence_of_strings : Construct a new + ExtensionArray from a sequence of strings. + api.extensions.ExtensionArray._hash_pandas_object : Hook for + hash_pandas_object. + Examples -------- >>> pd.arrays.IntegerArray._from_sequence([4, 5]) @@ -1707,6 +1720,17 @@ def _formatter(self, boxed: bool = False) -> Callable[[Any], str | None]: when ``boxed=False`` and :func:`str` is used when ``boxed=True``. + See Also + -------- + api.extensions.ExtensionArray._concat_same_type : Concatenate multiple + array of this dtype. + api.extensions.ExtensionArray._explode : Transform each element of + list-like to a row. + api.extensions.ExtensionArray._from_factorized : Reconstruct an + ExtensionArray after factorization. + api.extensions.ExtensionArray._from_sequence : Construct a new + ExtensionArray from a sequence of scalars. + Examples -------- >>> class MyExtensionArray(pd.arrays.NumpyExtensionArray): @@ -1783,11 +1807,21 @@ def _concat_same_type(cls, to_concat: Sequence[Self]) -> Self: Parameters ---------- to_concat : sequence of this type + An array of the same dtype to concatenate. Returns ------- ExtensionArray + See Also + -------- + api.extensions.ExtensionArray._explode : Transform each element of + list-like to a row. + api.extensions.ExtensionArray._formatter : Formatting function for + scalar values. + api.extensions.ExtensionArray._from_factorized : Reconstruct an + ExtensionArray after factorization. + Examples -------- >>> arr1 = pd.array([1, 2, 3]) @@ -1838,11 +1872,20 @@ def _accumulate( Returns ------- array + An array performing the accumulation operation. Raises ------ NotImplementedError : subclass does not define accumulations + See Also + -------- + api.extensions.ExtensionArray._concat_same_type : Concatenate multiple + array of this dtype. + api.extensions.ExtensionArray.view : Return a view on the array. + api.extensions.ExtensionArray._explode : Transform each element of + list-like to a row. + Examples -------- >>> arr = pd.array([1, 2, 3])