home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

5 rows where author_association = "CONTRIBUTOR", issue = 347712372 and user = 90008 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

  • hmaarrfk · 5 ✖

issue 1

  • FutureWarning: creation of DataArrays w/ coords Dataset · 5 ✖

author_association 1

  • CONTRIBUTOR · 5 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
410759337 https://github.com/pydata/xarray/pull/2344#issuecomment-410759337 https://api.github.com/repos/pydata/xarray/issues/2344 MDEyOklzc3VlQ29tbWVudDQxMDc1OTMzNw== hmaarrfk 90008 2018-08-06T16:02:09Z 2018-08-06T16:02:09Z CONTRIBUTOR

Thanks!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  FutureWarning: creation of DataArrays w/ coords Dataset 347712372
410575268 https://github.com/pydata/xarray/pull/2344#issuecomment-410575268 https://api.github.com/repos/pydata/xarray/issues/2344 MDEyOklzc3VlQ29tbWVudDQxMDU3NTI2OA== hmaarrfk 90008 2018-08-06T02:55:12Z 2018-08-06T02:55:12Z CONTRIBUTOR

Maybe the issue that I am facing is that I want to deal with the storage of my metadata and data seperately.

I used to have my own library that was replicating much of xarray's functionality, but your code is much nicer than anything I would be able to write in a finite time. :smile:

Following the information here: http://xarray.pydata.org/en/stable/data-structures.html#coordinates-methods

Currently, my serialization pipeline is: ```python import xarray as xr import numpy as np

Setup an array with coordinates

n = np.zeros(3) coords={'x': np.arange(3)} m = xr.DataArray(n, dims=['x'], coords=coords)

coords_dataset_dict = m.coords.to_dataset().to_dict() coords_dict = coords_dataset_dict['coords']

Read/Write dictionary to JSON file

This works, but I'm essentially creating an emtpy dataset for it

coords_set = xr.Dataset.from_dict(coords_dataset_dict) coords2 = coords_set.coords # so many coords :D m2 = xr.DataArray(np.zeros(shape=m.shape), dims=m.dims, coords=coords2)

I used to just pass the dataset to "coords"

m3 = xr.DataArray(np.zeros(shape=m.shape), dims=m.dims, coords=coords_set) ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  FutureWarning: creation of DataArrays w/ coords Dataset 347712372
410572206 https://github.com/pydata/xarray/pull/2344#issuecomment-410572206 https://api.github.com/repos/pydata/xarray/issues/2344 MDEyOklzc3VlQ29tbWVudDQxMDU3MjIwNg== hmaarrfk 90008 2018-08-06T02:31:02Z 2018-08-06T02:31:02Z CONTRIBUTOR

Is there a better way to serialize coordinates only?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  FutureWarning: creation of DataArrays w/ coords Dataset 347712372
410572013 https://github.com/pydata/xarray/pull/2344#issuecomment-410572013 https://api.github.com/repos/pydata/xarray/issues/2344 MDEyOklzc3VlQ29tbWVudDQxMDU3MjAxMw== hmaarrfk 90008 2018-08-06T02:29:34Z 2018-08-06T02:29:34Z CONTRIBUTOR

It seems like this warning isn't benign though. I will take your suggestion though (coords=dataset.coords)

I feel like I'm not the only one who probably did this. Should you raise an other warning explicitly?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  FutureWarning: creation of DataArrays w/ coords Dataset 347712372
410532428 https://github.com/pydata/xarray/pull/2344#issuecomment-410532428 https://api.github.com/repos/pydata/xarray/issues/2344 MDEyOklzc3VlQ29tbWVudDQxMDUzMjQyOA== hmaarrfk 90008 2018-08-05T16:45:27Z 2018-08-05T16:45:27Z CONTRIBUTOR

I came across this when serializing/deserializing my coordinates to a json file.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  FutureWarning: creation of DataArrays w/ coords Dataset 347712372

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