home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where author_association = "MEMBER", issue = 134376872 and user = 1217238 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

user 1

  • shoyer · 3 ✖

issue 1

  • save/load DataArray to numpy npz functions · 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
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 4083.84ms · About: xarray-datasette