Skip to content

Commit

Permalink
DOC: fix PR07,SA01,ES01 for pandas.arrays.SparseArray
Browse files Browse the repository at this point in the history
  • Loading branch information
tuhinsharma121 committed Nov 8, 2024
1 parent 754d091 commit 2fffa5d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 0 additions & 1 deletion ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.arrays.IntervalArray.length SA01" \
-i "pandas.arrays.IntervalArray.right SA01" \
-i "pandas.arrays.NumpyExtensionArray SA01" \
-i "pandas.arrays.SparseArray PR07,SA01" \
-i "pandas.arrays.TimedeltaArray PR07,SA01" \
-i "pandas.core.groupby.DataFrameGroupBy.boxplot PR07,RT03,SA01" \
-i "pandas.core.groupby.DataFrameGroupBy.get_group RT03,SA01" \
Expand Down
10 changes: 10 additions & 0 deletions pandas/core/arrays/sparse/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,12 +289,18 @@ class SparseArray(OpsMixin, PandasObject, ExtensionArray):
"""
An ExtensionArray for storing sparse data.
SparseArray efficiently stores data with a high frequency of a
specific fill value (e.g., zeros), saving memory by only retaining
non-fill elements and their indices. This class is particularly
useful for large datasets where most values are redundant.
Parameters
----------
data : array-like or scalar
A dense array of values to store in the SparseArray. This may contain
`fill_value`.
sparse_index : SparseIndex, optional
Index indicating the locations of sparse elements.
fill_value : scalar, optional
Elements in data that are ``fill_value`` are not stored in the
SparseArray. For memory savings, this should be the most common value
Expand Down Expand Up @@ -345,6 +351,10 @@ class SparseArray(OpsMixin, PandasObject, ExtensionArray):
-------
None
See Also
--------
SparseDtype : Dtype for sparse data.
Examples
--------
>>> from pandas.arrays import SparseArray
Expand Down

0 comments on commit 2fffa5d

Please sign in to comment.