Return elements from `self` or `other` depending on `cond`. Parameters ---------- cond : DataArray or Dataset Locations at which to preserve this objects values. dtypes have to be `bool` other : scalar, DataArray or Dataset, optional Value to
(self, cond, other=dtypes.NA)
| 1436 | ) |
| 1437 | |
| 1438 | def where(self, cond, other=dtypes.NA) -> T_Xarray: |
| 1439 | """Return elements from `self` or `other` depending on `cond`. |
| 1440 | |
| 1441 | Parameters |
| 1442 | ---------- |
| 1443 | cond : DataArray or Dataset |
| 1444 | Locations at which to preserve this objects values. dtypes have to be `bool` |
| 1445 | other : scalar, DataArray or Dataset, optional |
| 1446 | Value to use for locations in this object where ``cond`` is False. |
| 1447 | By default, inserts missing values. |
| 1448 | |
| 1449 | Returns |
| 1450 | ------- |
| 1451 | same type as the grouped object |
| 1452 | |
| 1453 | See Also |
| 1454 | -------- |
| 1455 | Dataset.where |
| 1456 | """ |
| 1457 | return ops.where_method(self, cond, other) |
| 1458 | |
| 1459 | def _first_or_last( |
| 1460 | self, |
no outgoing calls