Skip to content

Commit

Permalink
DOC: avoid SparseArray.take error (pandas-dev#23637)
Browse files Browse the repository at this point in the history
Closes pandas-dev#22215

SparseArray.take not accepting scalars is already in 0.24.0.txt
  • Loading branch information
TomAugspurger authored and jreback committed Nov 12, 2018
1 parent c738523 commit 2d4dd50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/source/whatsnew/v0.18.1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ These changes conform sparse handling to return the correct types and work to ma

``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`)

.. ipython:: python
.. code-block:: python

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

0 comments on commit 2d4dd50

Please sign in to comment.