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.

@dylanhmorris
Copy link
Author

Anything else needed for review?

@max-sixty max-sixty added the plan to merge Final call for comments label Sep 14, 2025
@max-sixty
Copy link
Collaborator

max-sixty commented Sep 14, 2025

looks good! will merge on the next ping or if anyone else sees it

thank you @dylanhmorris !

@max-sixty max-sixty removed the plan to merge Final call for comments label Sep 15, 2025
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
3 participants