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/4240#issuecomment-764726612,https://api.github.com/repos/pydata/xarray/issues/4240,764726612,MDEyOklzc3VlQ29tbWVudDc2NDcyNjYxMg==,5821660,2021-01-21T15:34:42Z,2021-01-21T15:46:36Z,MEMBER,"I've stumbled over this weird behaviour many times and was wondering why this happens. So AFAICT @shoyer hit the nail on the head but the root cause is that the Dataset is added to the notebook namespace somehow, if one just evaluates it in the cell.
This doesn't happen if you invoke the `__repr__` via
```python
display(xr.open_dataset(""saved_on_disk.nc""))
```
I've forced myself to use either `print` or `display` for xarray data. As this also happens if the Dataset is attached to a variable you would need to specifically delete (or .close()) the variable in question before opening again.
```python
try:
del ds
except NameError:
pass
ds = xr.open_dataset(""saved_on_disk.nc"")
```
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,662505658