Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cast PandasIndex to pd.(Multi)Index #5385

Merged
merged 3 commits into from
May 28, 2021

Conversation

benbovy
Copy link
Member

@benbovy benbovy commented May 27, 2021

Also make sure that a multi-index with one unique level are not cast to
a simple pd.Index
Copy link
Collaborator

@max-sixty max-sixty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:)

@benbovy benbovy merged commit 2b38adc into pydata:master May 28, 2021
TomNicholas pushed a commit to TomNicholas/xarray that referenced this pull request May 28, 2021
* fastpath cast Xarray's PandasIndex to pd.Index

Also make sure that a multi-index with one unique level are not cast to
a simple pd.Index

* update tests

* [skip-ci] update what's new
@benbovy benbovy deleted the fix-regression-mindex-cast branch March 29, 2022 07:09
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.

Regression: "ValueError: cannot unstack dimensions that do not have a MultiIndex" when unstacking a MultiIndex
2 participants