html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue
https://github.com/pydata/xarray/issues/2568#issuecomment-671101989,https://api.github.com/repos/pydata/xarray/issues/2568,671101989,MDEyOklzc3VlQ29tbWVudDY3MTEwMTk4OQ==,15331990,2020-08-09T21:15:41Z,2020-08-09T21:15:41Z,CONTRIBUTOR,"If I were to make a PR, where would this method reside? Would it be under dataset.py and dataarray.py? Also, would I simply call np.select inside the method, and if so, how would I add support for dask?
My minimal example atm:
```
import xarray as xr
import numpy as np
import hvplot.xarray
ds = xr.tutorial.open_dataset('air_temperature').isel(time=0)
ds['air_cats'] = (
('lat', 'lon'),
np.select([ds['air'].values >= 273.15, ds['air'].values < 273.15], ['above freezing', 'below freezing'])
)
ds.hvplot('lon', 'lat', hover_cols=['air_cats'])
```

","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,383945783
https://github.com/pydata/xarray/issues/2568#issuecomment-599133152,https://api.github.com/repos/pydata/xarray/issues/2568,599133152,MDEyOklzc3VlQ29tbWVudDU5OTEzMzE1Mg==,15331990,2020-03-14T20:48:52Z,2020-03-14T20:48:52Z,CONTRIBUTOR,"No, not from me at least.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,383945783
https://github.com/pydata/xarray/issues/2568#issuecomment-441344567,https://api.github.com/repos/pydata/xarray/issues/2568,441344567,MDEyOklzc3VlQ29tbWVudDQ0MTM0NDU2Nw==,15331990,2018-11-24T05:17:09Z,2018-11-24T05:25:45Z,CONTRIBUTOR,"Thanks for the quick replies! Is there interest in making this a built-in function? If so, I can help contribute a PR.
Also wondering about a way to wrap logic to that mapping.
Like below 0, replace with -1, between 0 and 10, replace with 5, and above 10, replace with 15 which is possible with three np.place statements I think, but have to think in backwards logic with ds.where().","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,383945783
https://github.com/pydata/xarray/issues/2568#issuecomment-441342986,https://api.github.com/repos/pydata/xarray/issues/2568,441342986,MDEyOklzc3VlQ29tbWVudDQ0MTM0Mjk4Ng==,15331990,2018-11-24T04:34:17Z,2018-11-24T04:34:17Z,CONTRIBUTOR,"I guess I'm thinking about more complex cases such as changing 0 -> 50, 1 -> 29, 2 -> 10
```
ds = xr.Dataset({'test': [0, 1, 2]})
ds.where((ds != 1) & (ds != 2), 50)
```
Thoughts on simplifying this?","{""total_count"": 3, ""+1"": 3, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,383945783