issue_comments: 557312857
This data as json
| 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/2461#issuecomment-557312857 | https://api.github.com/repos/pydata/xarray/issues/2461 | 557312857 | MDEyOklzc3VlQ29tbWVudDU1NzMxMjg1Nw== | 42118783 | 2019-11-21T23:06:34Z | 2019-11-21T23:07:32Z | NONE | @fujiisoup This method works when trying to add a single coordinate, but what about when you're trying to add multiple coordinates? Example: ``` import xarray as xr ds = xr.Dataset({'x': ('i', [0, 1, 2]), 'y': ('i', ['a', 'b', 'c']),'z': ('i', ['a', 'b', 'c'])}) ds= ds.set_coords(['y','z']) ds.swap_dims({'i':'y','i':'z'}) #doesn't work ds = xr.Dataset({'x': ('i', [0, 1, 2]), 'y': ('i', ['a', 'b', 'c']),'z': ('i', ['a', 'b', 'c'])}) ds= ds.set_coords('y') ds=ds.swap_dims({'i':'y'}) ds.set_coords('z') #doesn't work either ``` Is there any reason that this is the default behavior? This is a bit frustrating to work with after creating an xarray dataset from pandas. |
{
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
366626025 |