home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where issue = 1051241489 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 2

  • max-sixty 2
  • fmaussion 1

issue 1

  • Should str.format() work on xarray scalars? · 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
966634872 https://github.com/pydata/xarray/issues/5976#issuecomment-966634872 https://api.github.com/repos/pydata/xarray/issues/5976 IC_kwDOAMm_X845na14 fmaussion 10050469 2021-11-11T21:22:39Z 2021-11-11T21:22:57Z MEMBER

@fmaussion how would you envision this working for non-scalar arrays? Would it just raise?

Yes, similar to numpy:

```python da = xr.DataArray([1, 2, 3]).data print(f'{da}') print(f'{da:d}') [1 2 3]


TypeError Traceback (most recent call last) <ipython-input-93-e6dbd8f1cf00> in <module> 1 da = xr.DataArray([1, 2, 3]).data 2 print(f'{da}') ----> 3 print(f'{da:d}')

TypeError: unsupported format string passed to numpy.ndarray.format ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Should str.format() work on xarray scalars? 1051241489
966630134 https://github.com/pydata/xarray/issues/5976#issuecomment-966630134 https://api.github.com/repos/pydata/xarray/issues/5976 IC_kwDOAMm_X845nZr2 max-sixty 5635139 2021-11-11T21:14:45Z 2021-11-11T21:16:47Z MEMBER

Allowing __format__ to work could be a nice way of letting us having easy ways to represent scalars, while retaining the benefits of always returning an array from xarray methods.

Separate point but FWIW I generally use .item() to get the value out of a scalar array.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Should str.format() work on xarray scalars? 1051241489
966631260 https://github.com/pydata/xarray/issues/5976#issuecomment-966631260 https://api.github.com/repos/pydata/xarray/issues/5976 IC_kwDOAMm_X845nZ9c max-sixty 5635139 2021-11-11T21:16:37Z 2021-11-11T21:16:37Z MEMBER

@fmaussion how would you envision this working for non-scalar arrays? Would it just raise?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Should str.format() work on xarray scalars? 1051241489

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