Skip to content

Commit b81ed16

Browse files
DOC: fix SA01, ES01 for pandas.Series.sparse.sp_values (#59859)
1 parent b91be12 commit b81ed16

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

ci/code_checks.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
100100
-i "pandas.Series.sparse.fill_value SA01" \
101101
-i "pandas.Series.sparse.from_coo PR07,SA01" \
102102
-i "pandas.Series.sparse.npoints SA01" \
103-
-i "pandas.Series.sparse.sp_values SA01" \
104103
-i "pandas.Timedelta.max PR02" \
105104
-i "pandas.Timedelta.min PR02" \
106105
-i "pandas.Timedelta.resolution PR02" \

pandas/core/arrays/sparse/array.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,18 @@ def sp_values(self) -> np.ndarray:
603603
"""
604604
An ndarray containing the non- ``fill_value`` values.
605605
606+
This property returns the actual data values stored in the sparse
607+
representation, excluding the values that are equal to the ``fill_value``.
608+
The result is an ndarray of the underlying values, preserving the sparse
609+
structure by omitting the default ``fill_value`` entries.
610+
611+
See Also
612+
--------
613+
Series.sparse.to_dense : Convert a Series from sparse values to dense.
614+
Series.sparse.fill_value : Elements in `data` that are `fill_value` are
615+
not stored.
616+
Series.sparse.density : The percent of non- ``fill_value`` points, as decimal.
617+
606618
Examples
607619
--------
608620
>>> from pandas.arrays import SparseArray

0 commit comments

Comments
 (0)