issues: 789106802
This data as json
| id | node_id | number | title | user | state | locked | assignee | milestone | comments | created_at | updated_at | closed_at | author_association | active_lock_reason | draft | pull_request | body | reactions | performed_via_github_app | state_reason | repo | type | 
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 789106802 | MDU6SXNzdWU3ODkxMDY4MDI= | 4825 | clean up the API for renaming and changing dimensions / coordinates | 14808389 | open | 0 | 5 | 2021-01-19T15:11:55Z | 2021-09-10T15:04:14Z | MEMBER | From #4108: I wonder if it would be better to first "reorganize" all of the existing functions: we currently have  I believe we currently have these use cases (not sure if that list is complete, though):
- rename a  Sometimes, some of these can be emulated by combinations of others, for example: ```python x is a dimension without coordinatesassert_identical(ds.set_index({"x": "b"}), ds.swap_dims({"x": "b"}).rename({"b": "x"}))
assert_identical(ds.swap_dims({"x": "b"}), ds.set_index({"x": "b"}).rename({"x": "b"}))
 In any case I think we should add a guide which explains which method to pick in which situation (or extend  Originally posted by @keewis in https://github.com/pydata/xarray/issues/4108#issuecomment-761907785  | 
                
                    {
    "url": "https://api.github.com/repos/pydata/xarray/issues/4825/reactions",
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
} | 
                
                    13221727 | issue |