Skip to content

DOC: fix PR07,SA01,ES01 for pandas.arrays.SparseArray #60250

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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