issue_comments
8 rows where issue = 228295383 sorted by updated_at descending
This data as json, CSV (advanced)
Suggested facets: reactions, created_at (date), updated_at (date)
issue 1
- .sel does not keep selected coordinate value in case with MultiIndex · 8 ✖
id | html_url | issue_url | node_id | user | created_at | updated_at ▲ | author_association | body | reactions | performed_via_github_app | issue |
---|---|---|---|---|---|---|---|---|---|---|---|
919974416 | https://github.com/pydata/xarray/issues/1408#issuecomment-919974416 | https://api.github.com/repos/pydata/xarray/issues/1408 | IC_kwDOAMm_X8421bIQ | benbovy 4160723 | 2021-09-15T12:27:34Z | 2021-09-15T12:27:34Z | MEMBER | @fujiisoup the behavior that you expect has been implemented in #5692 (I still need to fix/update the tests): ```python
```python
Note that for the latter example, the @gabriel-abrahao feel free to open a new issue for your suggestion. |
{ "total_count": 3, "+1": 2, "-1": 0, "laugh": 0, "hooray": 1, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
.sel does not keep selected coordinate value in case with MultiIndex 228295383 | |
729306620 | https://github.com/pydata/xarray/issues/1408#issuecomment-729306620 | https://api.github.com/repos/pydata/xarray/issues/1408 | MDEyOklzc3VlQ29tbWVudDcyOTMwNjYyMA== | gabriel-abrahao 30908904 | 2020-11-18T00:56:45Z | 2020-11-18T00:56:45Z | CONTRIBUTOR | As a related issue, we could use an option for .sel to keep the selected variable as a singleton coordinate (an array of shape (1,)) instead of making it a scalar. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
.sel does not keep selected coordinate value in case with MultiIndex 228295383 | |
695364856 | https://github.com/pydata/xarray/issues/1408#issuecomment-695364856 | https://api.github.com/repos/pydata/xarray/issues/1408 | MDEyOklzc3VlQ29tbWVudDY5NTM2NDg1Ng== | stale[bot] 26384082 | 2020-09-19T23:01:48Z | 2020-09-19T23:01:48Z | NONE | In order to maintain a list of currently relevant issues, we mark issues as stale after a period of inactivity If this issue remains relevant, please comment here or remove the |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
.sel does not keep selected coordinate value in case with MultiIndex 228295383 | |
301356080 | https://github.com/pydata/xarray/issues/1408#issuecomment-301356080 | https://api.github.com/repos/pydata/xarray/issues/1408 | MDEyOklzc3VlQ29tbWVudDMwMTM1NjA4MA== | benbovy 4160723 | 2017-05-15T01:34:15Z | 2017-05-15T02:03:06Z | MEMBER | (mmh apparently I forgot to post a 2nd comment I wrote)
And this is just a nonsense :) Sorry it is late! Yep I agree it would be nice to have scalar coordinates in both cases. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
.sel does not keep selected coordinate value in case with MultiIndex 228295383 | |
301353831 | https://github.com/pydata/xarray/issues/1408#issuecomment-301353831 | https://api.github.com/repos/pydata/xarray/issues/1408 | MDEyOklzc3VlQ29tbWVudDMwMTM1MzgzMQ== | fujiisoup 6815844 | 2017-05-15T01:10:25Z | 2017-05-15T01:10:25Z | MEMBER | @benbovy Thanks for the comment. Actually, I expected the following behavior
And also for the second issue, I expected something like
Back to the first issue, I personally prefer to the automatic renaming
because it enables the following chain methods,
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
.sel does not keep selected coordinate value in case with MultiIndex 228295383 | |
301351084 | https://github.com/pydata/xarray/issues/1408#issuecomment-301351084 | https://api.github.com/repos/pydata/xarray/issues/1408 | MDEyOklzc3VlQ29tbWVudDMwMTM1MTA4NA== | benbovy 4160723 | 2017-05-15T00:33:15Z | 2017-05-15T00:33:15Z | MEMBER | The current behavior is actually dictated by pandas and I think it was initially intentional (before we could access MultiIndex levels as virtual coordinates). In the first example ```python In [11]: mdix = ds.yx.to_index() In [12]: midx.get_loc_level(2, level='x') Out[12]: (array([False, True, False, False, True, False], dtype=bool), Index(['a', 'b'], dtype='object', name='y')) ``` If we want to keep the But we still have to choose whether automatically renaming the dimension makes sense or not, i.e., choose between
and
The second issue is also due to how MultiIndex works in pandas: ```python In [10]: midx[0] Out[10]: ('a', 1) In [11]: midx[[0, 1]] Out[11]: MultiIndex(levels=[['a', 'b'], [1, 2, 3]], labels=[[0, 0], [0, 1]], names=['y', 'x']) ``` I'm just wondering if it really makes sense to keep a MultiIndex for a coordinate that is not a dimension anymore like in this case. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
.sel does not keep selected coordinate value in case with MultiIndex 228295383 | |
301303055 | https://github.com/pydata/xarray/issues/1408#issuecomment-301303055 | https://api.github.com/repos/pydata/xarray/issues/1408 | MDEyOklzc3VlQ29tbWVudDMwMTMwMzA1NQ== | fujiisoup 6815844 | 2017-05-14T10:19:15Z | 2017-05-14T10:19:15Z | MEMBER | @shoyer Thanks for the information. (Sorry for my inaccurate ipython output) Another related issue is
I am now looking into the code. Do you guys have any idea to fix them?
I am thinking to modify Index.remap_label_indexers
so that it also returns |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
.sel does not keep selected coordinate value in case with MultiIndex 228295383 | |
301218692 | https://github.com/pydata/xarray/issues/1408#issuecomment-301218692 | https://api.github.com/repos/pydata/xarray/issues/1408 | MDEyOklzc3VlQ29tbWVudDMwMTIxODY5Mg== | shoyer 1217238 | 2017-05-13T02:02:38Z | 2017-05-13T02:02:38Z | MEMBER | No, I don't think this was intentional/desired, though it might be slightly tricky to fix this with the current code structure. @benbovy any thoughts? For reference: ```python In [4]: ds Out[4]: <xarray.Dataset> Dimensions: (yx: 6) Coordinates: * yx (yx) MultiIndex - y (yx) object 'a' 'a' 'a' 'b' 'b' 'b' - x (yx) int64 1 2 3 1 2 3 Data variables: foo (yx) int64 1 2 3 4 5 6 In [5]: ds.sel(x=2) Out[5]: <xarray.Dataset> Dimensions: (y: 2) Coordinates: * y (y) object 'a' 'b' Data variables: foo (y) int64 2 5 ``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
.sel does not keep selected coordinate value in case with MultiIndex 228295383 |
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 5