home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

7 rows where author_association = "MEMBER" and issue = 134376872 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 4

  • shoyer 3
  • max-sixty 2
  • jhamman 1
  • fmaussion 1

issue 1

  • save/load DataArray to numpy npz functions · 7 ✖

author_association 1

  • MEMBER · 7 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
269081490 https://github.com/pydata/xarray/issues/768#issuecomment-269081490 https://api.github.com/repos/pydata/xarray/issues/768 MDEyOklzc3VlQ29tbWVudDI2OTA4MTQ5MA== fmaussion 10050469 2016-12-24T11:55:40Z 2016-12-24T11:55:40Z MEMBER

Closing this partly via https://github.com/pydata/xarray/pull/1169 and in favor of https://github.com/pydata/xarray/issues/1154

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  save/load DataArray to numpy npz functions 134376872
187576763 https://github.com/pydata/xarray/issues/768#issuecomment-187576763 https://api.github.com/repos/pydata/xarray/issues/768 MDEyOklzc3VlQ29tbWVudDE4NzU3Njc2Mw== max-sixty 5635139 2016-02-23T07:06:58Z 2016-02-23T07:06:58Z MEMBER

@jhamman nice!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  save/load DataArray to numpy npz functions 134376872
187575468 https://github.com/pydata/xarray/issues/768#issuecomment-187575468 https://api.github.com/repos/pydata/xarray/issues/768 MDEyOklzc3VlQ29tbWVudDE4NzU3NTQ2OA== jhamman 2443309 2016-02-23T06:58:25Z 2016-02-23T06:58:25Z MEMBER

@jonathanstrong - Thanks for the input. I agree, we could spice up our IO docs. Like you, I think it makes sense to play down the pickle serialization method.

@MaximilianR

unless open / open_dataset supports other formats...

It does. From here:

Formats supported by PyNIO

xarray can also read GRIB, HDF4 and other file formats supported by PyNIO_, if PyNIO is installed. To use PyNIO to read such files, supply engine='pynio' to xarray.open_dataset.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  save/load DataArray to numpy npz functions 134376872
187397477 https://github.com/pydata/xarray/issues/768#issuecomment-187397477 https://api.github.com/repos/pydata/xarray/issues/768 MDEyOklzc3VlQ29tbWVudDE4NzM5NzQ3Nw== max-sixty 5635139 2016-02-22T21:37:53Z 2016-02-22T21:37:53Z MEMBER

I'd vote for something format-specific, such as xr.from_netcdf unless open / open_dataset supports other formats...

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  save/load DataArray to numpy npz functions 134376872
187296721 https://github.com/pydata/xarray/issues/768#issuecomment-187296721 https://api.github.com/repos/pydata/xarray/issues/768 MDEyOklzc3VlQ29tbWVudDE4NzI5NjcyMQ== shoyer 1217238 2016-02-22T18:02:19Z 2016-02-22T18:02:19Z MEMBER

@jonathanstrong this is really helpful feedback! You are right to be suspicious of academics when it comes to file formats :) If you have concrete suggestions for doc improvements along these lines, please do put together a PR!

I've thought about the "magic name" approach, too -- my only concern is that it would be weird to get a DataArray back from xarray.open_dataset. But maybe xarray.open is a better name, anyways...

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  save/load DataArray to numpy npz functions 134376872
186492789 https://github.com/pydata/xarray/issues/768#issuecomment-186492789 https://api.github.com/repos/pydata/xarray/issues/768 MDEyOklzc3VlQ29tbWVudDE4NjQ5Mjc4OQ== shoyer 1217238 2016-02-20T02:37:23Z 2016-02-20T02:37:23Z MEMBER

I hadn't, for a number of reasons. First, I've used csv, hdf, sql, json, yaml and other formats but never came across netcdf until using this library as someone who isn't working in the physical sciences. Second, the documentation on netcdf is fairly dense. Third, didn't want to deal with installing the library.

OK, these are all fair points. Though you probably already have SciPy installed, which is enough for basic netCDF support.

I just did use it and seems like it is great for Datasets. As far as I can tell there is no way to save DataArrays directly, though?

This is true. But converting a DataArray to a Dataset is quite simple: arr.to_dataset(name='foo'), so I'm not sure it's worth adding.

Finally, would note that pandas has io methods for csv, excel, hdf, sql, json, msgpack, html, gbq, stata, "clipboard", and pickle. I think it's a strength to offer more choices.

Yes, choice is good -- but also note that none of those are invented file formats for pandas! I am slightly wary of going down this path, because at the point at which you have a file format that can faithfully represent every xarray object, you have basically reinvented netCDF :).

That said, something like JSON is generally useful enough (with a different niche than netCDF) that it could make sense to add IO support.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  save/load DataArray to numpy npz functions 134376872
185511777 https://github.com/pydata/xarray/issues/768#issuecomment-185511777 https://api.github.com/repos/pydata/xarray/issues/768 MDEyOklzc3VlQ29tbWVudDE4NTUxMTc3Nw== shoyer 1217238 2016-02-18T02:23:13Z 2016-02-18T02:23:13Z MEMBER

This is a pretty reasonable way to save data, but my only concern is that it's not clear to me that we need another file format when netCDF already solves this problem, in a completely portable way. Have you tried using xarray's netCDF IO?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  save/load DataArray to numpy npz functions 134376872

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