home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

1 row where issue = 445355249 and user = 14808389 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

  • keewis · 1 ✖

issue 1

  • decode_cf · 1 ✖

author_association 1

  • MEMBER 1
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
605640846 https://github.com/pydata/xarray/issues/2970#issuecomment-605640846 https://api.github.com/repos/pydata/xarray/issues/2970 MDEyOklzc3VlQ29tbWVudDYwNTY0MDg0Ng== keewis 14808389 2020-03-29T14:02:24Z 2020-03-29T14:02:24Z MEMBER

I think this is actually a python issue: python def _make_cf(self): self = xr.decode_cf(self) since self is a variable name in python (by convention referring to the instance, but it is not treated different from other names), this 1. calculates xr.decode_cf(self) which returns a new dataset with decoded values 2. reassigns self to the result (so it does not refer to the class instance anymore)

So that while this was intended to be a inplace modification, it actually is the same as python def _make_cf(self): xr.decode_cf(self) and does not do anything to the object.

In cases like this, use either aggregation or the register_dataset_accessor. Here's how this looks with aggregation: ```python class XResult: def init(self, data=None, coords=None, attrs=None, kwargs): if isinstance(data, str): kwargs = dict(READ_KWARGS, kwargs) with xr.open_dataset(data, **kwargs) as data: attrs = data.attrs

    self._data = xr.Dataset(data, coords, attrs)
    self._make_cf(self._data)

def _make_cf(self):
    self._data = xr.decode_cf(self._data)

```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  decode_cf 445355249

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