home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

5 rows where issue = 712217045 sorted by updated_at descending

✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 4

  • markusritschel 2
  • sjvrijn 1
  • zxdawn 1
  • emanuelegent 1

author_association 2

  • NONE 4
  • CONTRIBUTOR 1

issue 1

  • Reimplement GroupBy.argmax · 5 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1420123001 https://github.com/pydata/xarray/issues/4476#issuecomment-1420123001 https://api.github.com/repos/pydata/xarray/issues/4476 IC_kwDOAMm_X85UpVt5 emanuelegent 94073032 2023-02-07T02:55:26Z 2023-02-07T02:55:26Z NONE

Hi I would just like to add that having the argmax functionality would make possible to extract timestamp of maximum values, such as daily maximum values. Current resample in xarray doesn't allow that

{
    "total_count": 3,
    "+1": 3,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Reimplement GroupBy.argmax 712217045
1003782259 https://github.com/pydata/xarray/issues/4476#issuecomment-1003782259 https://api.github.com/repos/pydata/xarray/issues/4476 IC_kwDOAMm_X8471IBz sjvrijn 8833517 2022-01-02T22:03:22Z 2022-01-02T22:03:22Z CONTRIBUTOR

Using git bisect and @zxdawn's example, I've narrowed it down to commit bdcfab524e.

I'm guessing the exact culprit is the removal of argmin and argmax from NAN_REDUCE_METHODS in xarray/core/ops.py because dedicated implementations were added for Variable/DataSet/DataArray.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Reimplement GroupBy.argmax 712217045
788753958 https://github.com/pydata/xarray/issues/4476#issuecomment-788753958 https://api.github.com/repos/pydata/xarray/issues/4476 MDEyOklzc3VlQ29tbWVudDc4ODc1Mzk1OA== markusritschel 3332539 2021-03-02T09:16:10Z 2021-03-02T09:18:39Z NONE

@zxdawn I am pretty sure it was possible in v0.15.1. But I would need to check that again.

edit: I just checked the old documentation from that version, and it confirms my memory: http://xarray.pydata.org/en/accessor-documentation/generated/xarray.core.groupby.DataArrayGroupBy.argmax.html

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Reimplement GroupBy.argmax 712217045
788732242 https://github.com/pydata/xarray/issues/4476#issuecomment-788732242 https://api.github.com/repos/pydata/xarray/issues/4476 MDEyOklzc3VlQ29tbWVudDc4ODczMjI0Mg== zxdawn 30388627 2021-03-02T08:42:51Z 2021-03-02T08:42:51Z NONE

@markusritschel I tested v0.17.0 and it doesn't work.

data = np.random.rand(4, 3) locs = ["IA", "IL", "IN"] times = pd.date_range("2000-01-01", periods=4) foo = xr.DataArray(data, coords=[times, locs], dims=["time", "space"]) foo.groupby('space').argmax('time')

Error: AttributeError: 'DataArrayGroupBy' object has no attribute 'argmax'

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Reimplement GroupBy.argmax 712217045
722034130 https://github.com/pydata/xarray/issues/4476#issuecomment-722034130 https://api.github.com/repos/pydata/xarray/issues/4476 MDEyOklzc3VlQ29tbWVudDcyMjAzNDEzMA== markusritschel 3332539 2020-11-04T23:42:38Z 2020-11-04T23:42:38Z NONE

This was definitely possible in the last versions (at least in v.0.15.1). Can we make this available again?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Reimplement GroupBy.argmax 712217045

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