Re-think use of MultiIndex in `to_xarray_dataset`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 459
- Forks
- 359
- Avg merge
- 3d 6h
- Merged PRs (30d)
- 73
Description
The `to_xarray_dataset` method, by default, will create a MultiIndex if there are repeated values along any axis, and will then convert all `coords` to `data_vars`. This can cause problems in the expected xarray dataset structure.
We should re-think what cases really need a pandas index or a MultiIndex to minimize these unexpected issues.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the `to_xarray_dataset` method and tracing how repeated axis values lead to a pandas index or MultiIndex and how coordinates become data variables. Determine which cases require an index, then define the expected xarray dataset structure and document the cases that should be covered before implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- pandas, python
- Domain
- data
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100