title: What is the pandas.Panel deprecation warning actually recommending?
body: <p>I have a package that uses pandas Panels to generate MultiIndex pandas DataFrames.  However, whenever I use pandas.Panel, I get the following DeprecationError:</p>
  
  <blockquote>
    <p>DeprecationWarning: 
    Panel is deprecated and will be removed in a future version.
    The recommended way to represent these types of 3-dimensional data are with a MultiIndex on a DataFrame, via the Panel.to_frame() method.
    Alternatively, you can use the xarray package <a href="http://xarray.pydata.org/en/stable/" rel="noreferrer">http://xarray.pydata.org/en/stable/</a>.
        Pandas provides a <code>.to_xarray()</code> method to help automate this conversion.</p>
  </blockquote>
  
  <p>However, I can't understand what the first recommendation here is actually recommending in order to create MultiIndex DataFrames.  If Panel is going to be removed, how am I going to be able to use Panel.to_frame?</p>
  
  <hr>
  
  <p>To clarify: I am not asking what deprecation is, or how to convert my Panels to DataFrames.  What I am asking is, if I am using pandas.Panel and then pandas.Panel.to_frame in a library to create MultiIndex DataFrames from 3D ndarrays, and Panels are going to be deprecated, then what is the best option for making those DataFrames without using the Panel API?</p>
  
  <p>Eg, if I'm doing the following, with X as a ndarray with shape (N,J,K):</p>
  
  <pre><code>p = pd.Panel(X, items=item_names, major_axis=names0, minor_axis=names1)
  df = p.to_frame()
  </code></pre>
  
  <p>this is clearly no longer a viable future-proof option for DataFrame construction, though it was the recommended method in <a href="https://stackoverflow.com/questions/43427189/3-dimensional-numpy-array-to-multiindex-pandas-dataframe">this question</a>.</p>