Skip to content

Commit

Permalink
Update doc strings, pd.Panel is deprecated (#18956)
Browse files Browse the repository at this point in the history
  • Loading branch information
topper-123 authored and jreback committed Dec 27, 2017
1 parent 32aef5c commit d5314cc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -1403,6 +1403,8 @@ def to_panel(self):
Transform long (stacked) format (DataFrame) into wide (3D, Panel)
format.
.. deprecated:: 0.20.0
Currently the index of the DataFrame must be a 2-level MultiIndex. This
may be generalized later
Expand Down
7 changes: 7 additions & 0 deletions pandas/core/panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@ class Panel(NDFrame):
"""
Represents wide format panel data, stored as 3-dimensional array
.. deprecated:: 0.20.0
The recommended way to represent 3-D data are with a MultiIndex on a
DataFrame via the :attr:`~Panel.to_frame()` method or with the
`xarray package <http://xarray.pydata.org/en/stable/>`__.
Pandas provides a :attr:`~Panel.to_xarray()` method to automate this
conversion.
Parameters
----------
data : ndarray (items x major x minor), or dict of DataFrames
Expand Down

0 comments on commit d5314cc

Please sign in to comment.