home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

1 row where issue = 315948443 and user = 1411280 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

  • ExpHP · 1 ✖

issue 1

  • A way to generate automatically-numbered coords · 1 ✖

author_association 1

  • NONE 1
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
382960446 https://github.com/pydata/xarray/issues/2067#issuecomment-382960446 https://api.github.com/repos/pydata/xarray/issues/2067 MDEyOklzc3VlQ29tbWVudDM4Mjk2MDQ0Ng== ExpHP 1411280 2018-04-20T03:24:29Z 2018-04-20T03:27:09Z NONE

My issue is not so much with the range but the len. If done during construction from numpy arrays, it might need to be range(data.shape[0]) or range(data.shape[1]) or etc. based on the layout of the data. If done after construction with assign_coords, both the name of the dataset and the name of the dimension need to be written twice. This all creates room for silly mistakes.

On the bright side, the mistakes are quickly caught when the code executes at runtime. On the other side, they can be entirely avoided.


Of course, xarray doesn't have to do this; a user concerned about making these mistakes can easily capture this usage pattern in a wrapper function around assign_coords:

python def assign_auto_coords(da, *dims): """Give each specified dimension of a DataArray or Dataset automatic coords from 0 to n-1.""" return da.assign_coords(**{dim: range(self.sizes[dim]) for dim in dims})

it's merely that first-class support during construction would be nice to have.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  A way to generate automatically-numbered coords 315948443

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