home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where author_association = "NONE" and user = 13939 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

issue 3

  • added to_dict function for xarray objects 2
  • Add a filter_by_attrs method to Dataset 1
  • to_dict without data 1

user 1

  • kwilcox · 4 ✖

author_association 1

  • NONE · 4 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
462940017 https://github.com/pydata/xarray/pull/2659#issuecomment-462940017 https://api.github.com/repos/pydata/xarray/issues/2659 MDEyOklzc3VlQ29tbWVudDQ2Mjk0MDAxNw== kwilcox 13939 2019-02-12T21:21:13Z 2019-02-12T21:21:13Z NONE

If you are interested I could implement an xarray -> cf-json -> xarray round-trip. It will be a bit different from to_dict in terms of carrying through variable and attribute types so the file can be re-produced from the JSON. They both have their use-cases!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  to_dict without data 396501063
254223358 https://github.com/pydata/xarray/pull/917#issuecomment-254223358 https://api.github.com/repos/pydata/xarray/issues/917 MDEyOklzc3VlQ29tbWVudDI1NDIyMzM1OA== kwilcox 13939 2016-10-17T14:28:23Z 2016-10-17T14:28:23Z NONE

Before I looked at the code I assumed it was going to convert... but that's just me!

As it stands a custom encoder is needed to get a JSON dump from the output, which will be a fairly common use case for this function. See https://gist.github.com/kwilcox/c41834297b1a3b732cae3ee16621f6d0.

In the least maybe a little note in the documentation on how to dump the to_dict output to JSON (you also need to include decode_times=False because datetime objects are not JSON serializable either).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  added to_dict function for xarray objects 167091064
254218699 https://github.com/pydata/xarray/pull/917#issuecomment-254218699 https://api.github.com/repos/pydata/xarray/issues/917 MDEyOklzc3VlQ29tbWVudDI1NDIxODY5OQ== kwilcox 13939 2016-10-17T14:11:58Z 2016-10-17T14:11:58Z NONE

@jsignell was the intention to have only python scalars/lists in the dictionary (no numpy generics or arrays)? Right now attribute values are not being converted and results in a mixed dict of the data as a list but attributes still in numpy form. Thoughts?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  added to_dict function for xarray objects 167091064
217163460 https://github.com/pydata/xarray/pull/844#issuecomment-217163460 https://api.github.com/repos/pydata/xarray/issues/844 MDEyOklzc3VlQ29tbWVudDIxNzE2MzQ2MA== kwilcox 13939 2016-05-05T14:05:39Z 2016-05-05T14:05:56Z NONE

@ocefpaf I agree that keeping the xarray model consistent should take precedence. I also use this method to (mostly) pull out coordinate variables and can continue to use netCDF4.Dataset to do that.

{
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Add a filter_by_attrs method to Dataset 153126324

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