html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue
https://github.com/pydata/xarray/issues/719#issuecomment-255130691,https://api.github.com/repos/pydata/xarray/issues/719,255130691,MDEyOklzc3VlQ29tbWVudDI1NTEzMDY5MQ==,1217238,2016-10-20T14:57:17Z,2016-10-20T14:57:17Z,MEMBER,"@benbovy Agreed. My thought is that 0.9.0 should focus on index improvements -- finishing up optional indexes and multi-index support.
I crossed `sel_points` off the TODO list.
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,127068208
https://github.com/pydata/xarray/issues/719#issuecomment-255075134,https://api.github.com/repos/pydata/xarray/issues/719,255075134,MDEyOklzc3VlQ29tbWVudDI1NTA3NTEzNA==,4160723,2016-10-20T10:59:59Z,2016-10-20T10:59:59Z,MEMBER,"@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 `sel_points` / `sel_points` wouldn't be needed anymore, although MultiIndex interaction with this alternative indexing behavior must be addressed (but maybe later).
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,127068208
https://github.com/pydata/xarray/issues/719#issuecomment-236464071,https://api.github.com/repos/pydata/xarray/issues/719,236464071,MDEyOklzc3VlQ29tbWVudDIzNjQ2NDA3MQ==,1217238,2016-07-31T23:40:56Z,2016-08-05T22:14:34Z,MEMBER,"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:
```
Coordinates:
* level_0 (dim_0) object 'foo' 'foo' 'bar'
* level_1 (dim_0) int64 0 1 2
```
This probably wouldn't make sense until we have support for most of the other API niceties on this list (including indexing with `.sel`, which I just added).
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,127068208
https://github.com/pydata/xarray/issues/719#issuecomment-201380534,https://api.github.com/repos/pydata/xarray/issues/719,201380534,MDEyOklzc3VlQ29tbWVudDIwMTM4MDUzNA==,4160723,2016-03-25T17:33:52Z,2016-03-25T17:33:52Z,MEMBER,"Relevant comments!
> Agreed. I would suggest calling these set_index and reset_index, mirroring pandas, unless the API ends up differing enough that this would be confusing.
OK! I didn't make the link.
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,127068208
https://github.com/pydata/xarray/issues/719#issuecomment-201346715,https://api.github.com/repos/pydata/xarray/issues/719,201346715,MDEyOklzc3VlQ29tbWVudDIwMTM0NjcxNQ==,1217238,2016-03-25T16:10:47Z,2016-03-25T16:10:47Z,MEMBER,"> 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., xarray_idx_name, xarray_idx_level) to each of these coordinates so that it is possible to further rebuild the multi-index.
I think `index_level` would suffice for the serialization, unless we're interested in supporting serializing multiple multi-indexes along a dimension. I don't see much use for that, so I think it's fine to only support serializing mulit-indexes that are actually used as an index.
> 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.
Agreed. I would suggest calling these `set_index` and `reset_index`, mirroring pandas, unless the API ends up differing enough that this would be confusing.
> Similarly, a better repr would represent levels as sub-coordinates
Yes, also agreed! Here are a few ideas for the repr:
```
Coordinates:
* dim_0 (dim_0) MultiIndex
- level_0 object 'foo' 'foo' 'bar'
- level_1 int64 0 1 2
```
- maybe use another indicator (like `-`) for indenting sublevels like shown above
- consider writing `MultiIndex` as ""dtype"" for the upper level. Or maybe keep `object` as the dtype but write `MultiIndex` for the values.
- I don't see much use in showing the integer index level in the repr. We could consider showing the number in the MultiIndex sublevel, though I can see that getting confusing (especially because the number elements per level isn't reduced when doing indexing).
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,127068208
https://github.com/pydata/xarray/issues/719#issuecomment-201330301,https://api.github.com/repos/pydata/xarray/issues/719,201330301,MDEyOklzc3VlQ29tbWVudDIwMTMzMDMwMQ==,4160723,2016-03-25T15:19:45Z,2016-03-25T15:19:45Z,MEMBER,"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., `xarray_idx_name`, `xarray_idx_level`) to each of these coordinates so that it is possible to further rebuild the multi-index.
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:
```
array([0, 1, 2])
Coordinates:
* dim_0 (dim_0) object
level_0 (0) object 'foo' 'foo' 'bar'
level_1 (1) int64 0 1 2
```
Any thoughts on this (I can start PRs)?
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,127068208