issue_comments: 1039769097
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/6229#issuecomment-1039769097 | https://api.github.com/repos/pydata/xarray/issues/6229 | 1039769097 | IC_kwDOAMm_X849-Z4J | 4160723 | 2022-02-15T01:58:43Z | 2022-02-15T02:00:50Z | MEMBER | This has been discussed in #4825. A third option for Re your example, in #5692 ```python data_renamed <xarray.DataArray (x: 3)>array([5, 6, 7])Coordinates:x (x) int64 1 2 3``` Instead, it should be possible to directly set an index for the ```python API has still to be defineddata_indexed = data.set_index("c", index_cls=xr.PandasIndex) data_indexed.sel(c=[1, 2]) <xarray.DataArray (x: 2)>array([5, 6])Coordinates:* c (x) int64 1 2``` |
{ "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
1120405560 |