Skip to content

Commit 6c27ef2

Browse files
authored
update panel documentation (#3880)
* update panel documentation * @keewis feedback
1 parent c32d7bd commit 6c27ef2

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

doc/pandas.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,10 @@ Multi-dimensional data
110110
Tidy data is great, but it sometimes you want to preserve dimensions instead of
111111
automatically stacking them into a ``MultiIndex``.
112112

113-
:py:meth:`DataArray.to_pandas()` is a shortcut that
114-
lets you convert a DataArray directly into a pandas object with the same
115-
dimensionality (i.e., a 1D array is converted to a :py:class:`~pandas.Series`,
116-
2D to :py:class:`~pandas.DataFrame` and 3D to ``pandas.Panel``):
113+
:py:meth:`DataArray.to_pandas()` is a shortcut that lets you convert a
114+
DataArray directly into a pandas object with the same dimensionality, if
115+
available in pandas (i.e., a 1D array is converted to a
116+
:py:class:`~pandas.Series` and 2D to :py:class:`~pandas.DataFrame`):
117117

118118
.. ipython:: python
119119
@@ -151,13 +151,13 @@ However, you will need to set dimension names explicitly, either with the
151151
Transitioning from pandas.Panel to xarray
152152
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
153153

154-
``Panel``, pandas' data structure for 3D arrays, has always
155-
been a second class data structure compared to the Series and DataFrame. To
156-
allow pandas developers to focus more on its core functionality built around
157-
the DataFrame, pandas has deprecated ``Panel``. It will be removed in pandas
158-
0.25.
154+
``Panel``, pandas' data structure for 3D arrays, was always a second class
155+
data structure compared to the Series and DataFrame. To allow pandas
156+
developers to focus more on its core functionality built around the
157+
DataFrame, pandas removed ``Panel`` in favor of directing users who use
158+
multi-dimensional arrays to xarray.
159159

160-
xarray has most of ``Panel``'s features, a more explicit API (particularly around
160+
Xarray has most of ``Panel``'s features, a more explicit API (particularly around
161161
indexing), and the ability to scale to >3 dimensions with the same interface.
162162

163163
As discussed :ref:`elsewhere <data structures>` in the docs, there are two primary data structures in
@@ -210,7 +210,7 @@ You can also easily convert this data into ``Dataset``:
210210
array.to_dataset(dim='dim_0')
211211
212212
Here, there are two data variables, each representing a DataFrame on panel's
213-
``items`` axis, and labelled as such. Each variable is a 2D array of the
213+
``items`` axis, and labeled as such. Each variable is a 2D array of the
214214
respective values along the ``items`` dimension.
215215

216216
While the xarray docs are relatively complete, a few items stand out for Panel users:

0 commit comments

Comments
 (0)