@@ -608,6 +608,14 @@ def dtype(self) -> ExtensionDtype:
608
608
"""
609
609
An instance of ExtensionDtype.
610
610
611
+ See Also
612
+ --------
613
+ api.extensions.ExtensionDtype : Base class for extension dtypes.
614
+ api.extensions.ExtensionArray : Base class for extension array types.
615
+ api.extensions.ExtensionArray.dtype : The dtype of an ExtensionArray.
616
+ Series.dtype : The dtype of a Series.
617
+ DataFrame.dtype : The dtype of a DataFrame.
618
+
611
619
Examples
612
620
--------
613
621
>>> pd.array([1, 2, 3]).dtype
@@ -713,6 +721,16 @@ def astype(self, dtype: AstypeArg, copy: bool = True) -> ArrayLike:
713
721
An ``ExtensionArray`` if ``dtype`` is ``ExtensionDtype``,
714
722
otherwise a Numpy ndarray with ``dtype`` for its dtype.
715
723
724
+ See Also
725
+ --------
726
+ Series.astype : Cast a Series to a different dtype.
727
+ DataFrame.astype : Cast a DataFrame to a different dtype.
728
+ api.extensions.ExtensionArray : Base class for ExtensionArray objects.
729
+ core.arrays.DatetimeArray._from_sequence : Create a DatetimeArray from a
730
+ sequence.
731
+ core.arrays.TimedeltaArray._from_sequence : Create a TimedeltaArray from
732
+ a sequence.
733
+
716
734
Examples
717
735
--------
718
736
>>> arr = pd.array([1, 2, 3])
@@ -1032,6 +1050,12 @@ def _pad_or_backfill(
1032
1050
maximum number of entries along the entire axis where NaNs will be
1033
1051
filled.
1034
1052
1053
+ limit_area : {'inside', 'outside'} or None, default None
1054
+ Specifies which area to limit filling.
1055
+ - 'inside': Limit the filling to the area within the gaps.
1056
+ - 'outside': Limit the filling to the area outside the gaps.
1057
+ If `None`, no limitation is applied.
1058
+
1035
1059
copy : bool, default True
1036
1060
Whether to make a copy of the data before filling. If False, then
1037
1061
the original should be modified and no new memory should be allocated.
@@ -1043,6 +1067,16 @@ def _pad_or_backfill(
1043
1067
Returns
1044
1068
-------
1045
1069
Same type as self
1070
+ The filled array with the same type as the original.
1071
+
1072
+ See Also
1073
+ --------
1074
+ Series.ffill : Forward fill missing values.
1075
+ Series.bfill : Backward fill missing values.
1076
+ DataFrame.ffill : Forward fill missing values in DataFrame.
1077
+ DataFrame.bfill : Backward fill missing values in DataFrame.
1078
+ api.types.isna : Check for missing values.
1079
+ api.types.isnull : Check for missing values.
1046
1080
1047
1081
Examples
1048
1082
--------
@@ -1149,6 +1183,16 @@ def dropna(self) -> Self:
1149
1183
1150
1184
Returns
1151
1185
-------
1186
+ Self
1187
+ An ExtensionArray of the same type as the original but with all
1188
+ NA values removed.
1189
+
1190
+ See Also
1191
+ --------
1192
+ Series.dropna : Remove missing values from a Series.
1193
+ DataFrame.dropna : Remove missing values from a DataFrame.
1194
+ api.extensions.ExtensionArray.isna : Check for missing values in
1195
+ an ExtensionArray.
1152
1196
1153
1197
Examples
1154
1198
--------
@@ -1423,6 +1467,10 @@ def _values_for_factorize(self) -> tuple[np.ndarray, Any]:
1423
1467
`-1` and not included in `uniques`. By default,
1424
1468
``np.nan`` is used.
1425
1469
1470
+ See Also
1471
+ --------
1472
+ util.hash_pandas_object : Hash the pandas object.
1473
+
1426
1474
Notes
1427
1475
-----
1428
1476
The values returned by this method are also used in
@@ -1988,16 +2036,43 @@ def _reduce(
1988
2036
1989
2037
Returns
1990
2038
-------
1991
- scalar
2039
+ scalar or ndarray:
2040
+ The result of the reduction operation. The type of the result
2041
+ depends on `keepdims`:
2042
+ - If `keepdims` is `False`, a scalar value is returned.
2043
+ - If `keepdims` is `True`, the result is wrapped in a numpy array with
2044
+ a single element.
1992
2045
1993
2046
Raises
1994
2047
------
1995
2048
TypeError : subclass does not define operations
1996
2049
2050
+ See Also
2051
+ --------
2052
+ Series.min : Return the minimum value.
2053
+ Series.max : Return the maximum value.
2054
+ Series.sum : Return the sum of values.
2055
+ Series.mean : Return the mean of values.
2056
+ Series.median : Return the median of values.
2057
+ Series.std : Return the standard deviation.
2058
+ Series.var : Return the variance.
2059
+ Series.prod : Return the product of values.
2060
+ Series.sem : Return the standard error of the mean.
2061
+ Series.kurt : Return the kurtosis.
2062
+ Series.skew : Return the skewness.
2063
+
1997
2064
Examples
1998
2065
--------
1999
2066
>>> pd.array([1, 2, 3])._reduce("min")
2000
2067
1
2068
+ >>> pd.array([1, 2, 3])._reduce("max")
2069
+ 3
2070
+ >>> pd.array([1, 2, 3])._reduce("sum")
2071
+ 6
2072
+ >>> pd.array([1, 2, 3])._reduce("mean")
2073
+ 2.0
2074
+ >>> pd.array([1, 2, 3])._reduce("median")
2075
+ 2.0
2001
2076
"""
2002
2077
meth = getattr (self , name , None )
2003
2078
if meth is None :
0 commit comments