You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/source/dsintro.rst
+11-125
Original file line number
Diff line number
Diff line change
@@ -935,134 +935,20 @@ method:
935
935
minor_axis=['a', 'b', 'c', 'd'])
936
936
panel.to_frame()
937
937
938
-
939
-
.. _dsintro.panel4d:
940
-
941
-
Panel4D (Experimental)
942
-
----------------------
943
-
944
-
.. warning::
945
-
946
-
In 0.19.0 ``Panel4D`` is deprecated and will be removed in a future version. The recommended way to represent these types of n-dimensional data are with the `xarray package <http://xarray.pydata.org/en/stable/>`__. Pandas provides a :meth:`~Panel4D.to_xarray` method to automate this conversion.
947
-
948
-
``Panel4D`` is a 4-Dimensional named container very much like a ``Panel``, but
949
-
having 4 named dimensions. It is intended as a test bed for more N-Dimensional named
950
-
containers.
951
-
952
-
- **labels**: axis 0, each item corresponds to a Panel contained inside
953
-
- **items**: axis 1, each item corresponds to a DataFrame contained inside
954
-
- **major_axis**: axis 2, it is the **index** (rows) of each of the
955
-
DataFrames
956
-
- **minor_axis**: axis 3, it is the **columns** of each of the DataFrames
957
-
958
-
``Panel4D`` is a sub-class of ``Panel``, so most methods that work on Panels are
959
-
applicable to Panel4D. The following methods are disabled:
Note that the values in the dict need only be **convertible to Panels**.
988
-
Thus, they can be any of the other valid inputs to Panel as per above.
989
-
990
-
Slicing
991
-
~~~~~~~
992
-
993
-
Slicing works in a similar manner to a Panel. ``[]`` slices the first dimension.
994
-
``.ix`` allows you to slice arbitrarily and get back lower dimensional objects
995
-
996
-
.. ipython:: python
997
-
998
-
p4d['Label1']
999
-
1000
-
4D -> Panel
1001
-
1002
-
.. ipython:: python
1003
-
1004
-
p4d.ix[:,:,:,'A']
1005
-
1006
-
4D -> DataFrame
1007
-
1008
-
.. ipython:: python
1009
-
1010
-
p4d.ix[:,:,0,'A']
1011
-
1012
-
4D -> Series
1013
-
1014
-
.. ipython:: python
1015
-
1016
-
p4d.ix[:,0,0,'A']
1017
-
1018
-
Transposing
1019
-
~~~~~~~~~~~
1020
-
1021
-
A Panel4D can be rearranged using its ``transpose`` method (which does not make a
1022
-
copy by default unless the data are heterogeneous):
1023
-
1024
-
.. ipython:: python
1025
-
1026
-
p4d.transpose(3, 2, 1, 0)
1027
-
1028
938
.. _dsintro.panelnd:
939
+
.. _dsintro.panel4d:
1029
940
1030
-
PanelND (Experimental)
1031
-
----------------------
941
+
Panel4D and PanelND (Deprecated)
942
+
--------------------------------
1032
943
1033
944
.. warning::
1034
945
1035
-
In 0.19.0 ``PanelND`` is deprecated and will be removed in a future version. The recommended way to represent these types of n-dimensional data are with the `xarray package <http://xarray.pydata.org/en/stable/>`__.
946
+
In 0.19.0 ``Panel4D`` and ``PanelND`` are deprecated and will be removed in
947
+
a future version. The recommended way to represent these types of
0 commit comments