From d5314cc867554c2b14bb06416f841731fdcb56b9 Mon Sep 17 00:00:00 2001 From: topper-123 Date: Wed, 27 Dec 2017 19:39:23 +0000 Subject: [PATCH] Update doc strings, pd.Panel is deprecated (#18956) --- pandas/core/frame.py | 2 ++ pandas/core/panel.py | 7 +++++++ 2 files changed, 9 insertions(+) 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