home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 184456540

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
184456540 MDU6SXNzdWUxODQ0NTY1NDA= 1056 groupby_bins along two dims simultaneously 10050469 open 0     3 2016-10-21T10:50:06Z 2020-10-04T05:06:37Z   MEMBER      

I probably missed it, but what is the way to apply groupby (or rather groupby_bins) in order to achieve the following in xarray?

``` python da = xr.DataArray(np.arange(16).reshape((4, 4))) da <xarray.DataArray (dim_0: 4, dim_1: 4)> array([[ 0, 1, 2, 3], [ 4, 5, 6, 7], [ 8, 9, 10, 11], [12, 13, 14, 15]]) Coordinates: * dim_0 (dim_0) int64 0 1 2 3 * dim_1 (dim_1) int64 0 1 2 3

should be aggregated to (in case of summing) to obtain

dagg <xarray.DataArray (dim_0: 2, dim_1: 2)> array([[10, 18], [42, 50]]) Coordinates: * dim_1 (dim_1) int64 0 2 * dim_0 (dim_0) int64 0 2 ```

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

Links from other tables

  • 1 row from issues_id in issues_labels
  • 3 rows from issue in issue_comments
Powered by Datasette · Queries took 0.475ms · About: xarray-datasette