@@ -110,10 +110,10 @@ Multi-dimensional data
110
110
Tidy data is great, but it sometimes you want to preserve dimensions instead of
111
111
automatically stacking them into a ``MultiIndex ``.
112
112
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 `):
117
117
118
118
.. ipython :: python
119
119
@@ -151,13 +151,13 @@ However, you will need to set dimension names explicitly, either with the
151
151
Transitioning from pandas.Panel to xarray
152
152
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
153
153
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 .
159
159
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
161
161
indexing), and the ability to scale to >3 dimensions with the same interface.
162
162
163
163
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``:
210
210
array.to_dataset(dim = ' dim_0' )
211
211
212
212
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
214
214
respective values along the ``items `` dimension.
215
215
216
216
While the xarray docs are relatively complete, a few items stand out for Panel users:
0 commit comments