File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -81,9 +81,11 @@ You can index out a particular group:
8181
8282 ds.groupby(" letters" )[" b" ]
8383
84- Just like in pandas, creating a GroupBy object is cheap: it does not actually
84+ Just like in pandas, creating a `` GroupBy `` object is cheap: it does not actually
8585split the data until you access particular values.
8686
87+ To group by multiple variables, see the section on `Grouper Objects `_
88+
8789Binning
8890~~~~~~~
8991
@@ -276,7 +278,15 @@ is identical to
276278
277279 ds.groupby(x = UniqueGrouper())
278280
279- 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,
280290
281291.. code-block :: python
282292
You can’t perform that action at this time.
0 commit comments