issue_comments
2 rows where issue = 557257598 and user = 35968931 sorted by updated_at descending
This data as json, CSV (advanced)
Suggested facets: created_at (date), updated_at (date)
issue 1
- Repeated coordinates leads to unintuitive (broken?) indexing behaviour · 2 ✖
id | html_url | issue_url | node_id | user | created_at | updated_at ▲ | author_association | body | reactions | performed_via_github_app | issue |
---|---|---|---|---|---|---|---|---|---|---|---|
580662115 | https://github.com/pydata/xarray/issues/3731#issuecomment-580662115 | https://api.github.com/repos/pydata/xarray/issues/3731 | MDEyOklzc3VlQ29tbWVudDU4MDY2MjExNQ== | TomNicholas 35968931 | 2020-01-31T09:45:52Z | 2020-01-31T09:46:44Z | MEMBER |
I'm not sure it's that simple... What would you suggest the behaviour for |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Repeated coordinates leads to unintuitive (broken?) indexing behaviour 557257598 | |
580289880 | https://github.com/pydata/xarray/issues/3731#issuecomment-580289880 | https://api.github.com/repos/pydata/xarray/issues/3731 | MDEyOklzc3VlQ29tbWVudDU4MDI4OTg4MA== | TomNicholas 35968931 | 2020-01-30T14:52:27Z | 2020-01-30T14:52:27Z | MEMBER | Thanks for this @ivirshup , I'm surprised at this too. The problem seems to be that the DataArray you've managed to create breaks xarray's own data model! There should be one dim for each axis of the wrapped array, but ```python import xarray as xr import numpy as np sample_idx = xr.IndexVariable("sample_id", ["a", "b", "c"])
da = xr.DataArray(np.eye(3), coords=(sample_idx, sample_idx)
print(da)
I would have expected to get an array with two dims, which you can do by being more explicit:
Indexing that object behaves more like you (and I) would expect: ```python da.shape (3, 3)da[1, :].shape (3,)da.loc["a", :].shape (3,)da.loc[:, "a"].shape (3,)da[:, 1] <xarray.DataArray (dim0: 3)> array([0., 1., 0.]) Coordinates: * dim0 (dim0) <U1 'a' 'b' 'c' dim1 <U1 'b' ``` It also doesn't fit xarray's data model to have two coordinates along different dimensions with the same name as one another. I suggest that you create two separate coords (i.e. (We should also fix |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Repeated coordinates leads to unintuitive (broken?) indexing behaviour 557257598 |
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 1