home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

2 rows where author_association = "MEMBER", issue = 331668890 and user = 1197350 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 1

  • rabernat · 2 ✖

issue 1

  • Slow performance of isel · 2 ✖

author_association 1

  • MEMBER · 2 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
396675613 https://github.com/pydata/xarray/issues/2227#issuecomment-396675613 https://api.github.com/repos/pydata/xarray/issues/2227 MDEyOklzc3VlQ29tbWVudDM5NjY3NTYxMw== rabernat 1197350 2018-06-12T17:45:48Z 2018-06-12T17:45:48Z MEMBER

Another part of the matrix of possibilities. Takes about half the time if you pass time_filter.values (numpy array) rather than the time_filter DataArray: python %timeit ds.a.isel(time=time_filter.values) 1.3 s ± 67.4 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Slow performance of isel 331668890
396660606 https://github.com/pydata/xarray/issues/2227#issuecomment-396660606 https://api.github.com/repos/pydata/xarray/issues/2227 MDEyOklzc3VlQ29tbWVudDM5NjY2MDYwNg== rabernat 1197350 2018-06-12T16:55:55Z 2018-06-12T16:55:55Z MEMBER

I don't have experience using isel with boolean indexing. (Although the docs on positional indexing claim it is supported.) My guess is that that the time is being spent aligning the indexer with the array, which is unnecessary since you know they are already aligned. Probably not the most efficient pattern for xarray.

Here's how I would recommend writing the query using label-based selection: python %timeit ds.a.sel(time=slice(50_001, None)) 117 ms ± 5.29 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Slow performance of isel 331668890

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 55.123ms · About: xarray-datasette