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 http://xarray.pydata.org/en/stable/.
Pandas provides a `.to_xarray()` method to help automate this conversion.
--------------------------------------
上面说的意思:panel在新版本中被xarray的包取代了。可以使用xarray包下的 to_xarray() 方法。
使用方法,例子:
----------官方文档--------------------
pandas.Panel.to_xarray
Panel.to_xarray()[source]
Return an xarray object from the pandas object.
Returns:
xarray.DataArray or xarray.Dataset
Data in the pandas structure converted to Dataset if the object is a DataFrame, or a DataArray if the object i