Skip to content

Commit 2d4dd50

Browse files
TomAugspurgerjreback
authored andcommitted
DOC: avoid SparseArray.take error (pandas-dev#23637)
Closes pandas-dev#22215 SparseArray.take not accepting scalars is already in 0.24.0.txt
1 parent c738523 commit 2d4dd50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/source/whatsnew/v0.18.1.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ These changes conform sparse handling to return the correct types and work to ma
266266

267267
``SparseArray.take`` now returns a scalar for scalar input, ``SparseArray`` for others. Furthermore, it handles a negative indexer with the same rule as ``Index`` (:issue:`10560`, :issue:`12796`)
268268

269-
.. ipython:: python
269+
.. code-block:: python
270270

271271
s = pd.SparseArray([np.nan, np.nan, 1, 2, 3, np.nan, 4, 5, np.nan, 6])
272272
s.take(0)

0 commit comments

Comments
 (0)