Re-think use of MultiIndex in `to_xarray_dataset`

Open
#7,140 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Refactor
Clarity
Needs clarification
Activity status
Stale
Tech stack
pandas, python
Domain
data

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.

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.

Dominant language
Python
Stars
459
Forks
359
Avg merge
2d 22h
Merged PRs (30d)
82

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/Qcodes

All issues in microsoft/Qcodes

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.