home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 186492789

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/issues/768#issuecomment-186492789 https://api.github.com/repos/pydata/xarray/issues/768 186492789 MDEyOklzc3VlQ29tbWVudDE4NjQ5Mjc4OQ== 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
}
  134376872
Powered by Datasette · Queries took 0.571ms · About: xarray-datasette