2
2
Quickstart
3
3
##########
4
4
5
- Here is a quick overview of what xray's :py:class: ` ~xray.DataArray ` object can
6
- do. For more details, refer to the relevant sections in the remainder of the
7
- documentation.
5
+ Here are some quick examples of what you can do with xray's
6
+ :py:class: ` ~xray.DataArray ` object. Everything is explained in much more
7
+ detail in the rest of the documentation.
8
8
9
9
To begin, import numpy, pandas and xray:
10
10
@@ -17,6 +17,8 @@ To begin, import numpy, pandas and xray:
17
17
Create a DataArray
18
18
------------------
19
19
20
+ For more details, see :ref: `data structures `.
21
+
20
22
From scratch
21
23
~~~~~~~~~~~~
22
24
@@ -38,8 +40,8 @@ From pandas
38
40
foo = xray.DataArray(df, name = ' foo' )
39
41
foo
40
42
41
- DataArray properties
42
- --------------------
43
+ Properties
44
+ ----------
43
45
44
46
.. ipython :: python
45
47
@@ -51,6 +53,8 @@ DataArray properties
51
53
Indexing
52
54
--------
53
55
56
+ For more details, see :ref: `indexing `.
57
+
54
58
Like numpy
55
59
~~~~~~~~~~
56
60
@@ -79,8 +83,10 @@ By dimension name and coordinate label
79
83
80
84
foo.sel(x = [' a' , ' b' ])
81
85
82
- Calculations
83
- ------------
86
+ Computation
87
+ -----------
88
+
89
+ For more details, see :ref: `comput `.
84
90
85
91
Unary operations
86
92
~~~~~~~~~~~~~~~~
@@ -110,6 +116,8 @@ Binary operations
110
116
GroupBy
111
117
-------
112
118
119
+ For more details, see :ref: `groupby `.
120
+
113
121
.. ipython :: python
114
122
115
123
labels = xray.DataArray([' E' , ' F' , ' E' ], [foo.coords[' y' ]], name = ' labels' )
@@ -120,6 +128,8 @@ GroupBy
120
128
Convert to pandas
121
129
-----------------
122
130
131
+ For more details, see :ref: `pandas `.
132
+
123
133
.. ipython :: python
124
134
125
135
foo.to_dataframe()
0 commit comments