Skip to content

Commit 712000e

Browse files
authored
Changed kind parameter from integer to int, Added example (#32361)
1 parent 43321fa commit 712000e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pandas/core/arrays/sparse/array.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,16 @@ class SparseArray(PandasObject, ExtensionArray, ExtensionOpsMixin):
255255
Methods
256256
-------
257257
None
258+
259+
Examples
260+
--------
261+
>>> from pandas.arrays import SparseArray
262+
>>> arr = SparseArray([0, 0, 1, 2])
263+
>>> arr
264+
[0, 0, 1, 2]
265+
Fill: 0
266+
IntIndex
267+
Indices: array([2, 3], dtype=int32)
258268
"""
259269

260270
_pandas_ftype = "sparse"

0 commit comments

Comments
 (0)