home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

2 rows where issue = 266133430 and user = 1217238 sorted by updated_at descending

✖
✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: updated_at (date)

user 1

  • shoyer · 2 ✖

issue 1

  • DataArray.argsort should be deleted · 2 ✖

author_association 1

  • MEMBER 2
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
337631240 https://github.com/pydata/xarray/issues/1635#issuecomment-337631240 https://api.github.com/repos/pydata/xarray/issues/1635 MDEyOklzc3VlQ29tbWVudDMzNzYzMTI0MA== shoyer 1217238 2017-10-18T15:31:56Z 2017-10-18T15:31:56Z MEMBER

Note that ndarray.argsort(axis=None) sorts the flattened array, so the returned DataArray should respect this

I'm not a huge fan of auto-flattening for xarray, but I can see this logic.

Alternative suggestion: have DataArray.argsort() return an ndarray filled with labels from the sorted dimension

I would probably implement a new method for this, maybe idxsort for symmetry with idxmax (https://github.com/pydata/xarray/issues/60). Though that name could be read several different ways. Maybe sortby_labels()?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DataArray.argsort should be deleted 266133430
337387398 https://github.com/pydata/xarray/issues/1635#issuecomment-337387398 https://api.github.com/repos/pydata/xarray/issues/1635 MDEyOklzc3VlQ29tbWVudDMzNzM4NzM5OA== shoyer 1217238 2017-10-17T22:04:26Z 2017-10-17T22:19:51Z MEMBER

It seems like another reasonable choice would be for DataArray.argsort() to keep its current value but drop coordinate labels along the sorting dimension. This would give a consistent result for use with broadcasting indexing (https://github.com/pydata/xarray/pull/1473).

I think this internal utility function is equivalent to your second argsort: https://github.com/pydata/xarray/blob/2949558b75a65404a500a237ec54834fd6946d07/xarray/core/nputils.py#L38-L55

In practice, we might use bottleneck.rankdata() or nanrankdata(): https://kwgoodman.github.io/bottleneck-doc/reference.html#non-reduce-with-axis

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DataArray.argsort should be deleted 266133430

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 1938.369ms · About: xarray-datasette
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows