home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

3 rows where issue = 239918314 and user = 6815844 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

  • fujiisoup · 3 ✖

issue 1

  • Argmin indexes · 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
609103467 https://github.com/pydata/xarray/pull/1469#issuecomment-609103467 https://api.github.com/repos/pydata/xarray/issues/1469 MDEyOklzc3VlQ29tbWVudDYwOTEwMzQ2Nw== fujiisoup 6815844 2020-04-04T23:24:20Z 2020-04-04T23:24:20Z MEMBER

Hi @johnomotani . Probably I have no time to finish this up and this is already too old. It would be nice if someone can update this PR.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Argmin indexes 239918314
313061867 https://github.com/pydata/xarray/pull/1469#issuecomment-313061867 https://api.github.com/repos/pydata/xarray/issues/1469 MDEyOklzc3VlQ29tbWVudDMxMzA2MTg2Nw== fujiisoup 6815844 2017-07-05T10:13:18Z 2017-07-05T10:13:18Z MEMBER

@shoyer Sorry. My example was still not good (I modified the previous example slightly).

I think my current implementation does not work even for (the future version of) .sel, because the resultant xr.Dataset has the index for 'y' and labels for 'x'.

As you suggested, it looks more xarray-like if it returns coordinates for both 'x' and 'y', python <xarray.Dataset> Dimensions: (x: 3) Coordinates: * x (x) <U1 'c' 'b' 'a' Data variables: y (x) float64 1.4 4.3 1.4 so that it can be passed to .sel.

This API looks much more natural to me than the current one, although it has to wait for #974. I will update this PR.

For the function name. Based on your suggestion, how about labels_min or argmin_labels? I think function names of idxmin and (the current) indexes_min can be too different because idxmin should return 'index' while indexes_min returns label.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Argmin indexes 239918314
312908355 https://github.com/pydata/xarray/pull/1469#issuecomment-312908355 https://api.github.com/repos/pydata/xarray/issues/1469 MDEyOklzc3VlQ29tbWVudDMxMjkwODM1NQ== fujiisoup 6815844 2017-07-04T15:46:20Z 2017-07-05T10:06:53Z MEMBER

@shoyer Thanks for the comments.

  • APIs
    Sounds reasonable suggestions. I renamed argmin_indexs -> indexes_min. Also I added idxmin that works as similar to pandas's idxmin. The APIs are
    python def indexes_min(self, dims=None, skipna=True): and python def idxmin(self, dim=None, skipna=True, keep_dims=False): (I found keep_dims for indexes_min brings another confusion and omit from them).

  • isel_points's issue Currently, indexes_min works as ```python In [1]: import xarray as xr ...: da = xr.DataArray([[1, 2], [51, 40], [5, 6]], ...: [('x', ['c', 'b', 'a']), ('y', [1.4, 4.3])]) ...: da ...: Out[1]: <xarray.DataArray (x: 3, y: 2)> array([[ 1, 2], [51, 40], [ 5, 6]]) Coordinates:

  • x (x) <U1 'c' 'b' 'a'
  • y (y) float64 1.4 4.3

In [2]: da.indexes_min(dims='y') Out[2]: <xarray.Dataset> Dimensions: (x: 3) Coordinates: * x (x) <U1 'c' 'b' 'a' Data variables: y (x) float64 0 1 0

```

However, arguments of isel_points should be like python <xarray.Dataset> Dimensions: (points: 3) Data variables: x (points) int64 0 1 2 y (points) int64 0 1 0

This behavior is more intuitive?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Argmin indexes 239918314

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