issues: 567993968
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
567993968 | MDU6SXNzdWU1Njc5OTM5Njg= | 3782 | Add groupby.pipe? | 5635139 | closed | 0 | 4 | 2020-02-20T01:33:31Z | 2020-02-21T14:37:44Z | 2020-02-21T14:37:44Z | MEMBER | MCVE Code Sample```python In [1]: import xarray as xr In [3]: import numpy as np In [4]: ds = xr.Dataset( ...: {"foo": (("x", "y"), np.random.rand(4, 3))}, ...: coords={"x": [10, 20, 30, 40], "letters": ("x", list("abba"))}, ...: ) In [5]: ds.groupby('letters') In [8]: ds.groupby('letters').sum(...) / ds.groupby('letters').count(...) In [9]: ds.groupby('letters').pipe(lambda x: x.sum() / x.count())AttributeError Traceback (most recent call last) <ipython-input-9-c9b142ea051b> in <module> ----> 1 ds.groupby('letters').pipe(lambda x: x.sum() / x.count()) AttributeError: 'DatasetGroupBy' object has no attribute 'pipe' ``` Expected OutputI think we could add Output of
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/3782/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |