home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

5 rows where author_association = "MEMBER" and issue = 467814673 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 3

  • dcherian 3
  • max-sixty 1
  • spencerkclark 1

issue 1

  • selecting only october to march from monthly data using xarray · 5 ✖

author_association 1

  • MEMBER · 5 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
879975673 https://github.com/pydata/xarray/issues/3124#issuecomment-879975673 https://api.github.com/repos/pydata/xarray/issues/3124 MDEyOklzc3VlQ29tbWVudDg3OTk3NTY3Mw== max-sixty 5635139 2021-07-14T15:10:40Z 2021-07-14T15:10:40Z MEMBER

@NayanTalmale please open a discussion with a reproducible example

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  selecting only october to march from monthly data using xarray 467814673
511209340 https://github.com/pydata/xarray/issues/3124#issuecomment-511209340 https://api.github.com/repos/pydata/xarray/issues/3124 MDEyOklzc3VlQ29tbWVudDUxMTIwOTM0MA== dcherian 2448579 2019-07-14T14:53:57Z 2019-07-14T14:53:57Z MEMBER

If you use data = xr.open_mfdataset(...), the above solution will work

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  selecting only october to march from monthly data using xarray 467814673
511204486 https://github.com/pydata/xarray/issues/3124#issuecomment-511204486 https://api.github.com/repos/pydata/xarray/issues/3124 MDEyOklzc3VlQ29tbWVudDUxMTIwNDQ4Ng== dcherian 2448579 2019-07-14T13:49:12Z 2019-07-14T13:49:12Z MEMBER

Nice! I should use sel more

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  selecting only october to march from monthly data using xarray 467814673
511204028 https://github.com/pydata/xarray/issues/3124#issuecomment-511204028 https://api.github.com/repos/pydata/xarray/issues/3124 MDEyOklzc3VlQ29tbWVudDUxMTIwNDAyOA== spencerkclark 6628425 2019-07-14T13:42:47Z 2019-07-14T13:42:47Z MEMBER

I normally use something like this, which results in the equivalent of @dcherian's suggestion, but is a bit more direct: python data = data.sel(time=data.time.dt.month.isin([1, 2, 3, 10, 11, 12])) @mada0007 you can then subset in time to truncate the time series further afterwards: python result = data.sel(time=slice('1950-04', '1960-04'))

{
    "total_count": 6,
    "+1": 6,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  selecting only october to march from monthly data using xarray 467814673
511202616 https://github.com/pydata/xarray/issues/3124#issuecomment-511202616 https://api.github.com/repos/pydata/xarray/issues/3124 MDEyOklzc3VlQ29tbWVudDUxMTIwMjYxNg== dcherian 2448579 2019-07-14T13:24:25Z 2019-07-14T13:24:25Z MEMBER

You want something like data.where(data.time.dt.month.isin([1,2,3,10,11,12]), drop=True) I think

{
    "total_count": 5,
    "+1": 5,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  selecting only october to march from monthly data using xarray 467814673

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