issues: 1862912829
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1862912829 | PR_kwDOAMm_X85Yk15B | 8102 | Add `Coordinates.assign()` method | 4160723 | closed | 0 | 0 | 2023-08-23T09:15:51Z | 2023-09-01T13:28:16Z | 2023-09-01T13:28:16Z | MEMBER | 0 | pydata/xarray/pulls/8102 |
This is consistent with the Dataset and DataArray This allows writing: ```python midx = pd.MultiIndex.from_arrays([["a", "a", "b", "b"], [0, 1, 0, 1]]) midx_coords = xr.Coordinates.from_pandas_multiindex(midx, "x") ds = xr.Dataset(coords=midx_coords.assign(y=[1, 2])) ``` which is quite common (at least in the tests) and a bit nicer than
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/8102/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
13221727 | pull |