Skip to content

Conversation

dylanhmorris
Copy link

@dylanhmorris dylanhmorris commented Aug 26, 2025

I would be grateful for confirmation from someone more experienced with the codebase that my reasoning here is correct:

xarray/xarray/core/dataset.py

Lines 7186 to 7188 in ff03b8a

# All and only non-index arrays (whether data or coordinates) should
# become columns in the output DataFrame. Excluding indexes rather
# than dims handles the case of a MultiIndex along a single dimension.

Copy link

welcome bot commented Aug 26, 2025

Thank you for opening this pull request! It may take us a few days to respond here, so thank you for being patient.
If you have questions, some answers may be found in our contributing guidelines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dataset.to_dataframe() and DataArray.to_dataframe() convert multi-index levels both to pandas MultiIndex and to columns
1 participant