Skip to content

Commit d235492

Browse files
committed
Add sparse reshaping docs section
1 parent 331bc5f commit d235492

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

doc/source/sparse.rst

+9
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,15 @@ the correct dense result.
181181
np.abs(arr)
182182
np.abs(arr).to_dense()
183183
184+
.. _sparse.reshaping:
185+
186+
Reshaping by stacking and unstacking
187+
------------------------------------
188+
189+
``SparseSeries`` and ``SparseDataFrame`` implement ``.stack()`` and
190+
``.unstack()`` methods that should behave exactly the same as on
191+
:ref:`their non-sparse counterparts <reshaping.stacking>`.
192+
184193
.. _sparse.scipysparse:
185194

186195
Interaction with scipy.sparse

doc/source/whatsnew/v0.21.0.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ Performance Improvements
303303
Bug Fixes
304304
~~~~~~~~~
305305

306-
- Bug in :func:`SparseSeries.unstack` and :func:`SparseDataFrame.stack` (:issue:`16614`, :issue:`15045`)
306+
- Bug in :func:`SparseSeries.unstack` and :func:`SparseDataFrame.stack`. See :ref:`docs <sparse.reshaping>` (:issue:`16614`, :issue:`15045`)
307307

308308
Conversion
309309
^^^^^^^^^^

0 commit comments

Comments
 (0)