Skip to content

Commit d5314cc

Browse files
topper-123jreback
authored andcommitted
Update doc strings, pd.Panel is deprecated (#18956)
1 parent 32aef5c commit d5314cc

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

pandas/core/frame.py

+2
Original file line numberDiff line numberDiff line change
@@ -1403,6 +1403,8 @@ def to_panel(self):
14031403
Transform long (stacked) format (DataFrame) into wide (3D, Panel)
14041404
format.
14051405
1406+
.. deprecated:: 0.20.0
1407+
14061408
Currently the index of the DataFrame must be a 2-level MultiIndex. This
14071409
may be generalized later
14081410

pandas/core/panel.py

+7
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,13 @@ class Panel(NDFrame):
111111
"""
112112
Represents wide format panel data, stored as 3-dimensional array
113113
114+
.. deprecated:: 0.20.0
115+
The recommended way to represent 3-D data are with a MultiIndex on a
116+
DataFrame via the :attr:`~Panel.to_frame()` method or with the
117+
`xarray package <http://xarray.pydata.org/en/stable/>`__.
118+
Pandas provides a :attr:`~Panel.to_xarray()` method to automate this
119+
conversion.
120+
114121
Parameters
115122
----------
116123
data : ndarray (items x major x minor), or dict of DataFrames

0 commit comments

Comments
 (0)