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/6607#issuecomment-1126733173,https://api.github.com/repos/pydata/xarray/issues/6607,1126733173,IC_kwDOAMm_X85DKJV1,4160723,2022-05-14T15:06:14Z,2022-05-14T15:06:14Z,MEMBER,"> We could raise an error asking the user to switch to swap_dims.
Shouldn't we raise a warning instead? There may be relevant use cases like the example above (at least in the long term) where an index is not really needed?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1235725650
https://github.com/pydata/xarray/issues/6607#issuecomment-1126587818,https://api.github.com/repos/pydata/xarray/issues/6607,1126587818,IC_kwDOAMm_X85DJl2q,1217238,2022-05-14T00:10:13Z,2022-05-14T00:10:13Z,MEMBER,"> We could raise an error asking the user to switch to `swap_dims`.
This seems like a good idea
In the long term, we like to decouple indexes from coordinate, and make something like the following work:
```
ds.set_coords(['lon']).rename(x='lon').set_index('lon')
```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1235725650
https://github.com/pydata/xarray/issues/6607#issuecomment-1126549148,https://api.github.com/repos/pydata/xarray/issues/6607,1126549148,IC_kwDOAMm_X85DJcac,2448579,2022-05-13T22:19:14Z,2022-05-13T22:19:14Z,MEMBER,"@shoyer This was the regression I ran in to. We could raise an error asking the user to switch to `swap_dims`.
`x` is unindexed while `lon` is a coordinate variable. Then
```
ds = ds.rename(x='lon')
```
makes `lon` a dimension coordinate (though there is no entry in `._indexes`)
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1235725650
https://github.com/pydata/xarray/issues/6607#issuecomment-1126526149,https://api.github.com/repos/pydata/xarray/issues/6607,1126526149,IC_kwDOAMm_X85DJWzF,14808389,2022-05-13T21:34:20Z,2022-05-13T21:36:19Z,MEMBER,"this is a known issue, and one that we'd like to clean up (see #4825 for discussion). The short answer is that you should use `swap_dims` instead of `rename`:
```python
ds.swap_dims({""x"": ""lon""})
```","{""total_count"": 1, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 1, ""rocket"": 0, ""eyes"": 0}",,1235725650