We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da7e67b commit da23871Copy full SHA for da23871
doc/user-guide/groupby.rst
@@ -81,9 +81,11 @@ You can index out a particular group:
81
82
ds.groupby("letters")["b"]
83
84
-Just like in pandas, creating a GroupBy object is cheap: it does not actually
+Just like in pandas, creating a ``GroupBy`` object is cheap: it does not actually
85
split the data until you access particular values.
86
87
+To group by multiple variables, see the section on `Grouper Objects`_
88
+
89
Binning
90
~~~~~~~
91
@@ -276,7 +278,15 @@ is identical to
276
278
277
279
ds.groupby(x=UniqueGrouper())
280
-and
281
+We can use this to group by multiple dimensions:
282
283
+.. ipython:: python
284
285
+ from xarray.groupers import UniqueGrouper
286
287
+ ds.groupby(lat=UniqueGrouper(), lon=UniqueGrouper()).sum()
288
289
+Similarly,
290
291
.. code-block:: python
292
0 commit comments