@@ -6,7 +6,7 @@ Working with pandas
6
6
===================
7
7
8
8
One of the most important features of xarray is the ability to convert to and
9
- from :py:mod: ` pandas ` objects to interact with the rest of the PyData
9
+
10
10
ecosystem. For example, for plotting labeled data, we highly recommend
11
11
using the visualization `built in to pandas itself `__ or provided by the pandas
12
12
aware libraries such as `Seaborn `__.
@@ -112,8 +112,8 @@ automatically stacking them into a ``MultiIndex``.
112
112
113
113
:py:meth: `DataArray.to_pandas() ` is a shortcut that
114
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 `` ):
115
+ dimensionality (i.e., a 1D array is converted to a :py:class: `~pandas.Series ` and
116
+ 2D to :py:class: `~pandas.DataFrame `):
117
117
118
118
.. ipython :: python
119
119
@@ -151,11 +151,10 @@ 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 ``.
159
158
160
159
xarray has most of ``Panel ``'s features, a more explicit API (particularly around
161
160
indexing), and the ability to scale to >3 dimensions with the same interface.
@@ -210,7 +209,7 @@ You can also easily convert this data into ``Dataset``:
210
209
array.to_dataset(dim = ' dim_0' )
211
210
212
211
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
212
+ ``items `` axis, and labeled as such. Each variable is a 2D array of the
214
213
respective values along the ``items `` dimension.
215
214
216
215
While the xarray docs are relatively complete, a few items stand out for Panel users:
0 commit comments