home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

2 rows where issue = 216215022 and user = 1217238 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date)

user 1

  • shoyer · 2 ✖

issue 1

  • API for reshaping DataArrays as 2D "data matrices" for use in machine learning · 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
337959059 https://github.com/pydata/xarray/issues/1317#issuecomment-337959059 https://api.github.com/repos/pydata/xarray/issues/1317 MDEyOklzc3VlQ29tbWVudDMzNzk1OTA1OQ== shoyer 1217238 2017-10-19T16:14:54Z 2017-10-19T16:14:54Z MEMBER

IMO, the easiest way to do this would be to change these methods into top-level functions which can take any dict or iterable of datarrays.

:+1: for a function or class based interface if that makes sense. Can you share a few examples of what using your proposed API would look like?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  API for reshaping DataArrays as 2D "data matrices" for use in machine learning 216215022
288577529 https://github.com/pydata/xarray/issues/1317#issuecomment-288577529 https://api.github.com/repos/pydata/xarray/issues/1317 MDEyOklzc3VlQ29tbWVudDI4ODU3NzUyOQ== shoyer 1217238 2017-03-23T00:06:34Z 2017-03-23T00:06:34Z MEMBER

I've written similar code in the past as well, so I would be pretty supportive of adding a utility class for this. Actually one of my colleagues wrote a virtually identical class for our xarray equivalent in TensorFlow -- take a look at it for some possible alternative API options.

For xarray, .stack() and .to_array(), or .to_dataframe() can do most of the heavy lifting instead of manually reshaping.

Thanks for the pointer to xlearn, too!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  API for reshaping DataArrays as 2D "data matrices" for use in machine learning 216215022

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