issues: 1889195671
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1889195671 | I_kwDOAMm_X85wmtaX | 8166 | Dataset.from_dataframe: deprecate expanding the multi-index | 4160723 | open | 0 | 3 | 2023-09-10T15:54:31Z | 2023-09-11T06:20:50Z | MEMBER | What is your issue?Let's continue here the discussion about changing the behavior of Dataset.from_dataframe (see https://github.com/pydata/xarray/pull/8140#issuecomment-1712485626).
If we don't unstack anymore the multi-index in ```python ds = xr.Dataset( {"foo": (("x", "y"), [[1, 2], [3, 4]])}, coords={"x": ["a", "b"], "y": [1, 2]}, ) df = ds.to_dataframe() ds2 = xr.Dataset.from_dataframe(df, dim="z") ds2.identical(ds) # False ds2.unstack("z").identical(ds) # True ``` cc @max-sixty @dcherian |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/8166/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
13221727 | issue |