diff --git a/ci/code_checks.sh b/ci/code_checks.sh index 857a2d3216b89..2998d8470d36d 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -245,7 +245,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.Series.truediv PR07" \ -i "pandas.Series.update PR07,SA01" \ -i "pandas.Series.var PR01,RT03,SA01" \ - -i "pandas.SparseDtype SA01" \ -i "pandas.Timedelta PR07,SA01" \ -i "pandas.Timedelta.as_unit SA01" \ -i "pandas.Timedelta.asm8 SA01" \ diff --git a/pandas/core/dtypes/dtypes.py b/pandas/core/dtypes/dtypes.py index dc7e9afac331b..e10080604260a 100644 --- a/pandas/core/dtypes/dtypes.py +++ b/pandas/core/dtypes/dtypes.py @@ -1665,7 +1665,10 @@ class SparseDtype(ExtensionDtype): """ Dtype for data stored in :class:`SparseArray`. - This dtype implements the pandas ExtensionDtype interface. + `SparseDtype` is used as the data type for :class:`SparseArray`, enabling + more efficient storage of data that contains a significant number of + repetitive values typically represented by a fill value. It supports any + scalar dtype as the underlying data type of the non-fill values. Parameters ---------- @@ -1695,6 +1698,11 @@ class SparseDtype(ExtensionDtype): ------- None + See Also + -------- + arrays.SparseArray : The array structure that uses SparseDtype + for data representation. + Examples -------- >>> ser = pd.Series([1, 0, 0], dtype=pd.SparseDtype(dtype=int, fill_value=0))