# xarray.core.groupby.DatasetGroupBy.where¶

DatasetGroupBy.where(cond)

Return an object of the same shape with all entries where cond is True and all other entries masked.

This operation follows the normal broadcasting and alignment rules that xarray uses for binary arithmetic.

Parameters: cond : DataArray or Dataset same type as the grouped object

Dataset.where