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/5048#issuecomment-801528450,https://api.github.com/repos/pydata/xarray/issues/5048,801528450,MDEyOklzc3VlQ29tbWVudDgwMTUyODQ1MA==,13301940,2021-03-18T00:30:24Z,2021-03-18T00:30:24Z,MEMBER,"@Jeitan, have you looked into [`where()`](https://xarray.pydata.org/en/stable/generated/xarray.DataArray.where.html) yet? ```python In [16]: da['two'] = da.two.where(da.two != 'dd', 'd') In [17]: da Out[17]: array([[-0.01774725, 0.42453644, -0.80758257, 0.18659729, -1.14712204], [ 2.06813654, 1.32605605, -1.49284031, 0.5929485 , -2.29315181], [ 0.30243348, 0.05863335, 2.09869485, 1.79054292, -0.99844954]]) Coordinates: * one (one) int64 1 2 3 * two (two)