issues: 817885693
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
817885693 | MDU6SXNzdWU4MTc4ODU2OTM= | 4968 | swap_coords() function ? | 32069530 | open | 0 | 0 | 2021-02-27T10:00:53Z | 2021-02-27T10:01:52Z | NONE | Hi all, I have a DataArray with coordinates 'time'. I want to swap the time coordinate with another coordinate which is not in the array.
swap_dims() allows to give a non-existing dimension but I cannot define the coords at the same time. I usually use a workaround as follow.
I think it could be interesting to be able to swap_coords which could do the last two lines at the same time. Basically a swap_coords() function |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/4968/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
13221727 | issue |