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

Don't return IndexVariable with .dt accessor #9415

Merged
merged 4 commits into from
Sep 3, 2024

Conversation

dcherian
Copy link
Contributor

I think it makes sense to limit how much we expose IndexVariable to users so I removed it.

This PR also auto-converts IndexVariable to Variable when unstacking.

@dcherian dcherian requested a review from spencerkclark August 30, 2024 05:02
@dcherian dcherian force-pushed the fix-dt-accessor-index-var branch from 9d60841 to 0d6967d Compare August 30, 2024 05:11
Copy link
Member

@spencerkclark spencerkclark left a comment

Choose a reason for hiding this comment

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

Thanks @dcherian—I agree, I don't think there is much of a need to preserve IndexVariable objects with the .dt accessor. Thanks for fixing the unstack issue too!

The mypy failure is maybe real?

@dcherian dcherian added the plan to merge Final call for comments label Aug 30, 2024
@dcherian dcherian merged commit a8c9896 into pydata:main Sep 3, 2024
31 of 34 checks passed
@dcherian dcherian deleted the fix-dt-accessor-index-var branch September 4, 2024 05:24
hollymandel pushed a commit to hollymandel/xarray that referenced this pull request Sep 23, 2024
* Don't return IndexVariable with .dt accessor

Closes pydata#9190

* Support unstacking of index coordinates

* Finish test

* Fix mypy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plan to merge Final call for comments
Projects
None yet
Development

Successfully merging this pull request may close these issues.

unstack confusing re Variable / IndexVariable
2 participants