home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where author_association = "MEMBER", issue = 309691307 and user = 4160723 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: reactions, created_at (date), updated_at (date)

user 1

  • benbovy · 4 ✖

issue 1

  • slice using non-index coordinates · 4 ✖

author_association 1

  • MEMBER · 4 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1422518769 https://github.com/pydata/xarray/issues/2028#issuecomment-1422518769 https://api.github.com/repos/pydata/xarray/issues/2028 IC_kwDOAMm_X85Uyenx benbovy 4160723 2023-02-08T12:29:27Z 2023-02-08T12:41:00Z MEMBER

@gewitterblitz there is a kdtree-based index example in #7041 that works with multi-dimensional coordinates. You could also have a look at https://xoak.readthedocs.io/en/latest/ (it doesn't use Xarray indexes - soon hopefully - so the current API is via Xarray accessors).

EDIT: seeing your previous https://github.com/pydata/xarray/issues/2028#issuecomment-921926536, not sure how you could use slices for label selection using those indexes as I don't think the wrapped scipy / sklearn kdtree objects support range queries. Other spatial indexes may support it (e.g., there's an example in https://github.com/martinfleis/xvec of selecting points using a shapely.box, although currently it only supports 1-d geometry coordinates).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  slice using non-index coordinates 309691307
1421222703 https://github.com/pydata/xarray/issues/2028#issuecomment-1421222703 https://api.github.com/repos/pydata/xarray/issues/2028 IC_kwDOAMm_X85UtiMv benbovy 4160723 2023-02-07T18:01:39Z 2023-02-07T18:01:39Z MEMBER

@aberges-grd If your non-index coordinate supports it (I guess it does?), you could assign a default index to the coordinate with set_xindex and then use slices for selection like any other (dimension) coordinate backed by a pandas index.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  slice using non-index coordinates 309691307
1265252754 https://github.com/pydata/xarray/issues/2028#issuecomment-1265252754 https://api.github.com/repos/pydata/xarray/issues/2028 IC_kwDOAMm_X85LajmS benbovy 4160723 2022-10-03T10:38:57Z 2022-10-03T16:45:35Z MEMBER

With the last release v2022.09.0, this is now possible via .set_xindex():

```python a = a.set_xindex("currency")

a.sel(currency="EUR")

<xarray.DataArray (country: 2)>

array([20, 30])

Coordinates:

* country (country) <U7 'Germany' 'France'

* currency (country) <U3 'EUR' 'EUR'

```

Closed in #6971 (although set_xindex still needs to be documented in the User Guide).

{
    "total_count": 9,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 5,
    "confused": 0,
    "heart": 3,
    "rocket": 1,
    "eyes": 0
}
  slice using non-index coordinates 309691307
1202467717 https://github.com/pydata/xarray/issues/2028#issuecomment-1202467717 https://api.github.com/repos/pydata/xarray/issues/2028 IC_kwDOAMm_X85HrDOF benbovy 4160723 2022-08-02T12:48:47Z 2022-08-02T12:49:37Z MEMBER

Hi @covertg, as soon as there is public API for setting non-dimension or custom indexes it should be ready. See #6849, which is actually already implemented in the scipy22 branch (+ an example here). I plan to re-submit it as a proper PR within the few coming weeks.

{
    "total_count": 2,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 2,
    "rocket": 0,
    "eyes": 0
}
  slice using non-index coordinates 309691307

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

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]);
Powered by Datasette · Queries took 37.274ms · About: xarray-datasette