home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where issue = 272004812 and user = 1217238 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

  • shoyer · 3 ✖

issue 1

  • apply_ufunc(dask='parallelized') output_dtypes for datasets · 3 ✖

author_association 1

  • MEMBER 3
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
386835630 https://github.com/pydata/xarray/issues/1699#issuecomment-386835630 https://api.github.com/repos/pydata/xarray/issues/1699 MDEyOklzc3VlQ29tbWVudDM4NjgzNTYzMA== shoyer 1217238 2018-05-05T21:17:20Z 2018-05-05T21:17:20Z MEMBER

dtype = [getattr(x, 'dtype', getattr(x, 'dtypes'))] would be another alternative, but I agree it's ugly. The ternary expression dtype = x.dtypes if isinstance(x, xarray.Dataset) else x.dtype would also work.

I agree with the concern about duck typing, but my concern with Dataset.dtype is that there is strong convention for a dtype attribute to be an actual NumPy dtype.

Another option would be accept either objects with a dtype or dtypes in output_dtypes, like np.result_type(). Then you could write output_dtype=[x].

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  apply_ufunc(dask='parallelized') output_dtypes for datasets 272004812
384134364 https://github.com/pydata/xarray/issues/1699#issuecomment-384134364 https://api.github.com/repos/pydata/xarray/issues/1699 MDEyOklzc3VlQ29tbWVudDM4NDEzNDM2NA== shoyer 1217238 2018-04-25T01:42:36Z 2018-04-25T01:42:36Z MEMBER

I'm not sure about adding Dataset.dtype. Certainly Dataset.dtypes returning a dict would make sense -- that would match how pandas defines DataFrame.dtypes.

Anyways, I agree that output_dtypes=[{var1: t1, var2: t2, ...}, ...] is most natural, because it matches the structure of the outputs.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  apply_ufunc(dask='parallelized') output_dtypes for datasets 272004812
342670406 https://github.com/pydata/xarray/issues/1699#issuecomment-342670406 https://api.github.com/repos/pydata/xarray/issues/1699 MDEyOklzc3VlQ29tbWVudDM0MjY3MDQwNg== shoyer 1217238 2017-11-08T00:32:45Z 2017-11-08T00:32:45Z MEMBER

Yes, I like this. Though it's worth considering whether the syntax should reverse the list/dict nesting, e.g., output_dtypes={var1: [t1, ...], var2: [t2, ...], ...}.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  apply_ufunc(dask='parallelized') output_dtypes for datasets 272004812

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