diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 26257f6ecbc37..3243baa0008ae 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -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 diff --git a/pandas/core/panel.py b/pandas/core/panel.py index 0f3c5cb85249a..6d85e5bf7c7f9 100644 --- a/pandas/core/panel.py +++ b/pandas/core/panel.py @@ -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 `__. + Pandas provides a :attr:`~Panel.to_xarray()` method to automate this + conversion. + Parameters ---------- data : ndarray (items x major x minor), or dict of DataFrames