Skip to content

Commit

Permalink
DOC: Fix SA01 for pandas.SparseDtype (#58688)
Browse files Browse the repository at this point in the history
* DOC: add SA01 for pandas.SparseDtype

* DOC: remove SA01 for pandas.SparseDtype
  • Loading branch information
tuhinsharma121 committed May 12, 2024
1 parent 3de26e0 commit 9f7b3cc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 0 additions & 1 deletion ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down
10 changes: 9 additions & 1 deletion pandas/core/dtypes/dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
----------
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 9f7b3cc

Please sign in to comment.