home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

5 rows where issue = 213082731 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 3

  • shoyer 3
  • andreas-h 1
  • fmaussion 1

author_association 2

  • MEMBER 4
  • CONTRIBUTOR 1

issue 1

  • Create `xarray.Dataset` from a `netCDF4.Dataset` object · 5 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
347906958 https://github.com/pydata/xarray/issues/1304#issuecomment-347906958 https://api.github.com/repos/pydata/xarray/issues/1304 MDEyOklzc3VlQ29tbWVudDM0NzkwNjk1OA== shoyer 1217238 2017-11-29T16:02:03Z 2017-11-29T16:02:03Z MEMBER

This was fixed by https://github.com/pydata/xarray/pull/1508

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Create `xarray.Dataset` from a `netCDF4.Dataset` object 213082731
285745464 https://github.com/pydata/xarray/issues/1304#issuecomment-285745464 https://api.github.com/repos/pydata/xarray/issues/1304 MDEyOklzc3VlQ29tbWVudDI4NTc0NTQ2NA== shoyer 1217238 2017-03-10T18:22:26Z 2017-03-10T18:22:26Z MEMBER

Yes, from_ncdataset would be better.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Create `xarray.Dataset` from a `netCDF4.Dataset` object 213082731
285737819 https://github.com/pydata/xarray/issues/1304#issuecomment-285737819 https://api.github.com/repos/pydata/xarray/issues/1304 MDEyOklzc3VlQ29tbWVudDI4NTczNzgxOQ== andreas-h 358378 2017-03-10T17:52:22Z 2017-03-10T17:52:22Z CONTRIBUTOR

Sounds good. However, maybe from_ncdataset would avoid possible name confusion given that there's a Dataset in both xarray and netCDF4? On the other hand, at least in this context one of the options wouldn't make sense ... What do you think?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Create `xarray.Dataset` from a `netCDF4.Dataset` object 213082731
285730870 https://github.com/pydata/xarray/issues/1304#issuecomment-285730870 https://api.github.com/repos/pydata/xarray/issues/1304 MDEyOklzc3VlQ29tbWVudDI4NTczMDg3MA== shoyer 1217238 2017-03-10T17:25:36Z 2017-03-10T17:26:12Z MEMBER

This does seem like a reasonable thing to do in the advanced API. I would suggest adding another constructor in the form of a classmethod, maybe NetCDF4DataStore.from_dataset?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Create `xarray.Dataset` from a `netCDF4.Dataset` object 213082731
285398877 https://github.com/pydata/xarray/issues/1304#issuecomment-285398877 https://api.github.com/repos/pydata/xarray/issues/1304 MDEyOklzc3VlQ29tbWVudDI4NTM5ODg3Nw== fmaussion 10050469 2017-03-09T16:16:58Z 2017-03-09T16:16:58Z MEMBER

I also needed something like this but @shoyer decided against this change until there is a cleaner datastore API.

A (very) dirty workaround it to subclass xarray.backends.NetCDF4DataStore and redefine __init__ to accept netcdf datasets as argument:

``` class _NetCDF4DataStore(NetCDF4DataStore): """Just another way to init xarray's datastore.""" def init(self, filename, mode='r', format='NETCDF4', group=None, writer=None, clobber=True, diskless=False, persist=False, ds=None): import netCDF4 as nc4 if format is None: format = 'NETCDF4' if ds is None: ds = nc4.Dataset(filename, mode=mode, clobber=clobber, diskless=diskless, persist=persist, format=format) with close_on_error(ds): self.ds = _nc4_group(ds, group, mode) self.format = format self.is_remote = False self._filename = filename super(NetCDF4DataStore, self).init(writer)

nc = netCDF4.Dataset(filename) ds = xr.open_dataset(_NetCDF4DataStore(filename, ds=nc)) ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Create `xarray.Dataset` from a `netCDF4.Dataset` object 213082731

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