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/pull/1028#issuecomment-268273685,https://api.github.com/repos/pydata/xarray/issues/1028,268273685,MDEyOklzc3VlQ29tbWVudDI2ODI3MzY4NQ==,4160723,2016-12-20T15:34:34Z,2016-12-20T15:34:34Z,MEMBER,This should now behave correctly with optional indexes.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,180638999
https://github.com/pydata/xarray/pull/1028#issuecomment-260796716,https://api.github.com/repos/pydata/xarray/issues/1028,260796716,MDEyOklzc3VlQ29tbWVudDI2MDc5NjcxNg==,4160723,2016-11-15T22:54:18Z,2016-11-15T22:54:18Z,MEMBER,"This is ready for another round of review.
I've changed the signature of `reset_index` to option C. It is also almost ready for #1017 (just added two small TODOs).
> Did you go for allowing set_index() to rename variables?
Not yet, but as you said we could safely add this later.
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,180638999
https://github.com/pydata/xarray/pull/1028#issuecomment-258887083,https://api.github.com/repos/pydata/xarray/issues/1028,258887083,MDEyOklzc3VlQ29tbWVudDI1ODg4NzA4Mw==,4160723,2016-11-07T16:37:03Z,2016-11-07T16:37:03Z,MEMBER,"Just committed review changes.
`.reset_index()` doesn't accept kwargs anymore, though I don't know what to choose between the options below (currently option A is implemented):
- option A: `reset_index(dim, levels=None)` where `dim` may accept multiple dimension names (in
that case `levels` must be a list of lists with the same length than `dim`, or simply `None` that
would then be applied to all given dimensions).
- option B: same than option A, `reset_index(dim, levels=None)`, except that `dim` only accepts
one dimension (thus a bit simpler but less flexible).
- option C: `reset_index(dim_or_levels)` where one can provide a list of dimension(s) and/or
level(s). This is the most flexible and concise, though maybe less readable. Allow providing both
dimensions and levels may be ambiguous too.
> if x is a normal (non-multi) Index, array.reset_index('x') is not well defined
Currently `.reset_index()` doesn't allow resetting normal indexes, but we can wait for #1017 before merging this.
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,180638999
https://github.com/pydata/xarray/pull/1028#issuecomment-258497688,https://api.github.com/repos/pydata/xarray/issues/1028,258497688,MDEyOklzc3VlQ29tbWVudDI1ODQ5NzY4OA==,4160723,2016-11-04T17:34:33Z,2016-11-04T17:34:33Z,MEMBER,"Sorry for the delay @shoyer. I've read your comments above and they all seem relevant. I'll find some time next week to get back on this.
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,180638999
https://github.com/pydata/xarray/pull/1028#issuecomment-255070082,https://api.github.com/repos/pydata/xarray/issues/1028,255070082,MDEyOklzc3VlQ29tbWVudDI1NTA3MDA4Mg==,4160723,2016-10-20T10:32:57Z,2016-10-20T10:34:21Z,MEMBER,"Some API design questions (mostly from @shoyer's review) we need to fix:
- We need to choose whether to use `dim=indexes` kwargs or fixed arg/kwarg relative to a given dimension for the signatures of `.set_index()`, `.reset_index()` and `.reorder_levels()`.
- Do we also allow `.set_index()` to rename the dimension(s) if needed, instead of doing `.set_index(...).rename(...)` ? Is this a common use case that is worth it?
- After discussion in #1017, it seems that we need an easy way to (re)set indexes _either_ to no index _or_ to range(n).
For point 1, my preference goes to `dim=indexes` kwargs, especially if we need 2 and 3. It's less succinct, but it's more close to the signatures of other xarray methods like `.reindex()` or `.sel()`, and it allows (re)setting the indexes of multiple dimensions in a single call. Given 2, I find `set_index(new_dim_name=['level_1', 'level_3'])` a bit more elegant than `set_index(['level_1', 'level_2'], name='new_dim_name')`. Given 3, `array.reset_index('x')` seems ambiguous compared to `array.reset_index(x=None)` (no index) and, e.g., `array.reset_index(x='range')` (range(n) index).
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,180638999