Skip to content

Commit 02487c7

Browse files
Fix pandas.api.extensions.ExtensionArray.dtype
Add 'See Also' section
1 parent 3ac2a29 commit 02487c7

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

ci/code_checks.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
193193
-i "pandas.Timestamp.tzinfo GL08" \
194194
-i "pandas.Timestamp.value GL08" \
195195
-i "pandas.Timestamp.year GL08" \
196-
-i "pandas.api.extensions.ExtensionArray.dtype SA01" \
197196
-i "pandas.api.extensions.ExtensionArray.duplicated RT03,SA01" \
198197
-i "pandas.api.extensions.ExtensionArray.fillna SA01" \
199198
-i "pandas.api.extensions.ExtensionArray.insert PR07,RT03,SA01" \

pandas/core/arrays/base.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,14 @@ def dtype(self) -> ExtensionDtype:
608608
"""
609609
An instance of ExtensionDtype.
610610
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+
611619
Examples
612620
--------
613621
>>> pd.array([1, 2, 3]).dtype
@@ -2065,10 +2073,6 @@ def _reduce(
20652073
2.0
20662074
>>> pd.array([1, 2, 3])._reduce("median")
20672075
2.0
2068-
>>> pd.array([1, np.nan, 2, np.nan])._reduce("sum", skipna=False)
2069-
nan
2070-
>>> pd.array([1, np.nan, 2, np.nan])._reduce("sum", skipna=True)
2071-
3
20722076
"""
20732077
meth = getattr(self, name, None)
20742078
if meth is None:

0 commit comments

Comments
 (0)