Skip to content

Commit 9f7b3cc

Browse files
DOC: Fix SA01 for pandas.SparseDtype (#58688)
* DOC: add SA01 for pandas.SparseDtype * DOC: remove SA01 for pandas.SparseDtype
1 parent 3de26e0 commit 9f7b3cc

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

ci/code_checks.sh

-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
245245
-i "pandas.Series.truediv PR07" \
246246
-i "pandas.Series.update PR07,SA01" \
247247
-i "pandas.Series.var PR01,RT03,SA01" \
248-
-i "pandas.SparseDtype SA01" \
249248
-i "pandas.Timedelta PR07,SA01" \
250249
-i "pandas.Timedelta.as_unit SA01" \
251250
-i "pandas.Timedelta.asm8 SA01" \

pandas/core/dtypes/dtypes.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -1665,7 +1665,10 @@ class SparseDtype(ExtensionDtype):
16651665
"""
16661666
Dtype for data stored in :class:`SparseArray`.
16671667
1668-
This dtype implements the pandas ExtensionDtype interface.
1668+
`SparseDtype` is used as the data type for :class:`SparseArray`, enabling
1669+
more efficient storage of data that contains a significant number of
1670+
repetitive values typically represented by a fill value. It supports any
1671+
scalar dtype as the underlying data type of the non-fill values.
16691672
16701673
Parameters
16711674
----------
@@ -1695,6 +1698,11 @@ class SparseDtype(ExtensionDtype):
16951698
-------
16961699
None
16971700
1701+
See Also
1702+
--------
1703+
arrays.SparseArray : The array structure that uses SparseDtype
1704+
for data representation.
1705+
16981706
Examples
16991707
--------
17001708
>>> ser = pd.Series([1, 0, 0], dtype=pd.SparseDtype(dtype=int, fill_value=0))

0 commit comments

Comments
 (0)