-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Follow-ups on MultIndex support #719
Comments
Thinking about serialization, a possible solution would be splitting the multi-index into separate coordinates for the same dimension, then assign some specific attributes (e.g., More generally, a couple of methods acting on coordinates only can be a complement to stack/unstack methods (acting on both coordinates and dimensions). Merge/split xarray coordinates into/from a multi-index seem very straightforward to implement. Similarly, a better repr would represent levels as sub-coordinates:
Any thoughts on this (I can start PRs)? |
I think
Agreed. I would suggest calling these
Yes, also agreed! Here are a few ideas for the repr:
|
Relevant comments!
OK! I didn't make the link. |
It might be worth considering making the MultiIndex levels the primary coordinates, and making the multi-index itself the "virtual" coordinate that only appears when indexed. This would suggest a repr like:
This probably wouldn't make sense until we have support for most of the other API niceties on this list (including indexing with |
@shoyer it would be nice if we can close this issue before the next major release (0.9.0). There is only a few (though important) issues to fix in #1028, and right after it is merged I can open a new PR for serialization to NetCDF, for which I don't see any big issue. Given the new indexing behavior you suggest in #974, I guess that having MultiIndex support for |
@benbovy Agreed. My thought is that 0.9.0 should focus on index improvements -- finishing up optional indexes and multi-index support. I crossed |
In order to maintain a list of currently relevant issues, we mark issues as stale after a period of inactivity |
xref #702
ds['time']
can pull out the'time'
level of a multi-index)ds.sel(time='2000-01')
.Make(differed until we figure out Indexing with alignment and broadcasting #974)isel_points
/sel_points
return objects with a MultiIndex? (probably after the previous TODO, so we can preserve basic backwards compatibility)set_index
/reset_index
/swaplevel
to make it easier to create and manipulate multi-indexesThe text was updated successfully, but these errors were encountered: