home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 712217045

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
712217045 MDU6SXNzdWU3MTIyMTcwNDU= 4476 Reimplement GroupBy.argmax 1200058 open 0     5 2020-09-30T19:25:22Z 2023-03-03T06:59:40Z   NONE      

Please implement

Is your feature request related to a problem? Please describe. Observed: python da.groupby("g").argmax(dim="t") ```python


AttributeError Traceback (most recent call last) <ipython-input-84-15c199b0f7d4> in <module> ----> 1 da.groupby("g").argmax(dim="t")

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

Describe the solution you'd like Expected: Vector of length len(unique(g)) containing the indices of da["t"] where the value was maximum.

Workaround: python da.groupby("g").apply(lambda c: c.argmax(dim="t")) <xarray.DataArray 'da' (st: 11, g: 1)> array([[ 7], [ 0], [14], [14], [ 0], [ 0], [ 7], [ 0], [14], [ 0], [ 7]]) Coordinates: * st (st) object 'a' ... 'z' * g (g) object 'E'

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4476/reactions",
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    13221727 issue

Links from other tables

  • 2 rows from issues_id in issues_labels
  • 5 rows from issue in issue_comments
Powered by Datasette · Queries took 0.57ms · About: xarray-datasette