issues: 208312826
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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 208312826 | MDU6SXNzdWUyMDgzMTI4MjY= | 1273 | replace a dim with a coordinate from another dataset | 1197350 | open | 0 | 4 | 2017-02-17T02:15:36Z | 2022-04-09T15:26:20Z | MEMBER | I often want a function that takes a dataarray / dataset and replaces a dimension with a coordinate from a different dataset. @shoyer proposed the following simple solution. ```python def replace_dim(da, olddim, newdim): renamed = da.rename({olddim: newdim.name})
``` Is this of broad enough interest to add a build in method for? |
{
"url": "https://api.github.com/repos/pydata/xarray/issues/1273/reactions",
"total_count": 3,
"+1": 3,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
13221727 | issue |