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/4415#issuecomment-690538286,https://api.github.com/repos/pydata/xarray/issues/4415,690538286,MDEyOklzc3VlQ29tbWVudDY5MDUzODI4Ng==,3958036,2020-09-10T17:29:28Z,2020-09-10T17:29:28Z,CONTRIBUTOR,"Apparently it's possible to work around this by using `merge()` instead of assigning. The following produces the expected output:
```
import numpy as np
import xarray as xr
ds = xr.Dataset()
ds[""a""] = xr.DataArray(np.linspace(0., 1.), dims=""x"")
ds[""x""] = xr.DataArray(np.linspace(0., 2., len(ds[""x""])), dims=""x"")
ds[""x""].attrs[""foo""] = ""bar""
print(ds[""x""])
#ds[""b""] = xr.DataArray(np.linspace(0., 1.), dims=""x"")
ds = ds.merge(xr.DataArray(np.linspace(0., 1.), dims=""x"", name=""b""))
print(ds[""x""])
```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,698263021
https://github.com/pydata/xarray/issues/4415#issuecomment-690535154,https://api.github.com/repos/pydata/xarray/issues/4415,690535154,MDEyOklzc3VlQ29tbWVudDY5MDUzNTE1NA==,3958036,2020-09-10T17:24:06Z,2020-09-10T17:24:06Z,CONTRIBUTOR,"Unfortunately I don't have time at the moment to dig into why this is happening, but it was confusing because I found a bug where attrs had disappeared, and eventually chased it down to where some new variables were added to my Dataset, which I would not expect to change existing coordinates!","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,698263021