issues: 2248614324
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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2248614324 | I_kwDOAMm_X86GByG0 | 8952 | `isel(multi_index_level_name = MultiIndex.level)` corrupts the MultiIndex | 2448579 | open | 0 | 1 | 2024-04-17T15:41:39Z | 2024-04-18T13:14:46Z | MEMBER | What happened?From https://github.com/pydata/xarray/discussions/8951 if cc @benbovy What did you expect to happen?No response Minimal Complete Verifiable Example```Python import pandas as pd, xarray as xr, numpy as np xr.set_options(use_flox=True) test = pd.DataFrame() test["x"] = np.arange(100) % 10 test["y"] = np.arange(100) test["z"] = np.arange(100) test["v"] = np.arange(100) d = xr.Dataset.from_dataframe(test) d = d.set_index(index = ["x", "y", "z"]) print(d) m = d.groupby("x").mean() print(m) print(d.xindexes) print(m.isel(x=d.x).xindexes) xr.align(d, m.isel(x=d.x)) res = d.groupby("x") - mprint(res)```
MVCE confirmation
Relevant log outputNo response Anything else we need to know?No response Environment |
{
"url": "https://api.github.com/repos/pydata/xarray/issues/8952/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
13221727 | issue |