issue_comments
9 rows where issue = 134359597 sorted by updated_at descending
This data as json, CSV (advanced)
Suggested facets: created_at (date), updated_at (date)
issue 1
- MultiIndex and data selection · 9 ✖
id | html_url | issue_url | node_id | user | created_at | updated_at ▲ | author_association | body | reactions | performed_via_github_app | issue |
---|---|---|---|---|---|---|---|---|---|---|---|
247031135 | https://github.com/pydata/xarray/issues/767#issuecomment-247031135 | https://api.github.com/repos/pydata/xarray/issues/767 | MDEyOklzc3VlQ29tbWVudDI0NzAzMTEzNQ== | benbovy 4160723 | 2016-09-14T14:28:29Z | 2016-09-14T14:28:29Z | MEMBER | Fixed in #802 and #947. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
MultiIndex and data selection 134359597 | |
191826844 | https://github.com/pydata/xarray/issues/767#issuecomment-191826844 | https://api.github.com/repos/pydata/xarray/issues/767 | MDEyOklzc3VlQ29tbWVudDE5MTgyNjg0NA== | shoyer 1217238 | 2016-03-03T16:00:50Z | 2016-03-03T16:00:50Z | MEMBER | If you try that doing that indexing with a pandas.Series, you actually get an error message: ``` In [71]: s.loc['bar', slice(4000, 4100.3)] .../Users/shoyer/conda/envs/xarray-dev/lib/python3.5/site-packages/pandas/core/indexing.py in _getitem_axis(self, key, axis) 1363 # nested tuple slicing 1364 if is_nested_tuple(key, labels): -> 1365 locs = labels.get_locs(key) 1366 indexer = [ slice(None) ] * self.ndim 1367 indexer[axis] = locs /Users/shoyer/conda/envs/xarray-dev/lib/python3.5/site-packages/pandas/core/index.py in get_locs(self, tup) 5692 if not self.is_lexsorted_for_tuple(tup): 5693 raise KeyError('MultiIndex Slicing requires the index to be fully lexsorted' -> 5694 ' tuple len ({0}), lexsort depth ({1})'.format(len(tup), self.lexsort_depth)) 5695 5696 # indexer KeyError: 'MultiIndex Slicing requires the index to be fully lexsorted tuple len (2), lexsort depth (0,) ``` I guess it's also worth investigating |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
MultiIndex and data selection 134359597 | |
191625512 | https://github.com/pydata/xarray/issues/767#issuecomment-191625512 | https://api.github.com/repos/pydata/xarray/issues/767 | MDEyOklzc3VlQ29tbWVudDE5MTYyNTUxMg== | benbovy 4160723 | 2016-03-03T07:24:34Z | 2016-03-03T07:24:34Z | MEMBER | From this point of view I agree that Unless I miss a better solution, we can use
will a-priori return a stacked
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
MultiIndex and data selection 134359597 | |
191315935 | https://github.com/pydata/xarray/issues/767#issuecomment-191315935 | https://api.github.com/repos/pydata/xarray/issues/767 | MDEyOklzc3VlQ29tbWVudDE5MTMxNTkzNQ== | shoyer 1217238 | 2016-03-02T16:32:43Z | 2016-03-02T16:32:43Z | MEMBER | The good news about writing our own custom way to select levels is that because we can avoid the stack/unstack, we can simply omit unused levels without worrying about doing I would be OK with Last year at the SciPy conference sprints, @jonathanrocher was working on adding similar dictionary support into
This is a fair point, but such scenarios are unlikely to appear in practice. We might be able to, for example, update our handling of MultiIndexes to guarantee that level names cannot conflict with other variables. This might be done by inserting dummy-variables of some sort into the
Yes, agreed. Unfortunately the pandas code that handles this is a complete mess of spaghetti code (see pandas/core/indexers.py). So are welcome to try decoding it, but in my opinion you might be better off starting from scratch. In xarray, the function convert_label_indexer would need an updated interface that allows it to possibly return a new |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
MultiIndex and data selection 134359597 | |
191303962 | https://github.com/pydata/xarray/issues/767#issuecomment-191303962 | https://api.github.com/repos/pydata/xarray/issues/767 | MDEyOklzc3VlQ29tbWVudDE5MTMwMzk2Mg== | benbovy 4160723 | 2016-03-02T16:05:31Z | 2016-03-02T16:05:31Z | MEMBER | OK, I've read more carefully the discussion you referred to, and now I understand why it is preferable to call The
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
MultiIndex and data selection 134359597 | |
191239041 | https://github.com/pydata/xarray/issues/767#issuecomment-191239041 | https://api.github.com/repos/pydata/xarray/issues/767 | MDEyOklzc3VlQ29tbWVudDE5MTIzOTA0MQ== | benbovy 4160723 | 2016-03-02T13:31:36Z | 2016-03-02T13:31:36Z | MEMBER | Thinking about this issue, I'd like to know what you think of the suggestions below before considering any pull request. The following line code gives the same result than in my previous comment, but it is more explicit and shorter:
A nice shortcut to this would be adding a new
Like Pandas, the default value of I think that this solution is better than, e.g., directly providing index level names as arguments of the Another, though less elegant, solution would be to provide dictionnaries to the
Besides this, It would be nice if the |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
MultiIndex and data selection 134359597 | |
185826486 | https://github.com/pydata/xarray/issues/767#issuecomment-185826486 | https://api.github.com/repos/pydata/xarray/issues/767 | MDEyOklzc3VlQ29tbWVudDE4NTgyNjQ4Ng== | benbovy 4160723 | 2016-02-18T17:31:29Z | 2016-02-18T17:31:29Z | MEMBER | Thanks for the tip. So I finally obtain the desired result when selecting the band 'bar' by doing this:
But it's still a lot of code to write for such a common operation. I'd be happy to think more deeply about this and contribute to the development of this great package ! (within the limits of my skills) |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
MultiIndex and data selection 134359597 | |
185796850 | https://github.com/pydata/xarray/issues/767#issuecomment-185796850 | https://api.github.com/repos/pydata/xarray/issues/767 | MDEyOklzc3VlQ29tbWVudDE4NTc5Njg1MA== | shoyer 1217238 | 2016-02-18T16:16:00Z | 2016-02-18T16:16:00Z | MEMBER | This is a really good point that honestly I had not thought carefully about before. I agree that it would be very nice to have this behavior, though. This will require a bit of internal refactoring to pass on the level information to the MultiIndex during indexing. To remove unused levels after unstacking, you need to add an explicit I raised another issue for the bug related to copying MultiIndex that you had in the earlier version of this PR (#769). More broadly, if you care about MultiIndex support, it would be great to get some help pushing it. I'm happy to answer questions, but I'm at a new job and don't have a lot of time to work on new development. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
MultiIndex and data selection 134359597 | |
185677090 | https://github.com/pydata/xarray/issues/767#issuecomment-185677090 | https://api.github.com/repos/pydata/xarray/issues/767 | MDEyOklzc3VlQ29tbWVudDE4NTY3NzA5MA== | benbovy 4160723 | 2016-02-18T11:38:53Z | 2016-02-18T11:38:53Z | MEMBER | Mmm now I'm wondering if the problem I explained above isn't just related to the 3rd TODO item in #719 (make levels accessible as coordinate variables). Sorry for the post if it is the case. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
MultiIndex and data selection 134359597 |
Advanced export
JSON shape: default, array, newline-delimited, object
CREATE TABLE [issue_comments] ( [html_url] TEXT, [issue_url] TEXT, [id] INTEGER PRIMARY KEY, [node_id] TEXT, [user] INTEGER REFERENCES [users]([id]), [created_at] TEXT, [updated_at] TEXT, [author_association] TEXT, [body] TEXT, [reactions] TEXT, [performed_via_github_app] TEXT, [issue] INTEGER REFERENCES [issues]([id]) ); CREATE INDEX [idx_issue_comments_issue] ON [issue_comments] ([issue]); CREATE INDEX [idx_issue_comments_user] ON [issue_comments] ([user]);
user 2