issues: 349855157
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
349855157 | MDU6SXNzdWUzNDk4NTUxNTc= | 2362 | Wrong behavior of DataArray.resample | 6815844 | closed | 0 | 0 | 2018-08-13T00:02:47Z | 2019-10-22T19:42:08Z | 2019-10-22T19:42:08Z | MEMBER | From #2356, I noticed resample and groupby works nice for Dataset but not for DataArray Code Sample, a copy-pastable example if possible```python In [14]: import numpy as np ...: import xarray as xr ...: import pandas as pd ...: ...: time = pd.date_range('2000-01-01', freq='6H', periods=365 * 4) ...: ds = xr.Dataset({'foo': (('time', 'x'), np.random.randn(365 * 4, 5)), 'time': time, ...: 'x': np.arange(5)}) In [15]: ds
Out[15]:
<xarray.Dataset>
Dimensions: (time: 1460, x: 5)
Coordinates:
* time (time) datetime64[ns] 2000-01-01 ... 2000-12-30T18:00:00
* x (x) int64 0 1 2 3 4
Data variables:
foo (time, x) float64 -0.6916 -1.247 0.5376 ... -0.2197 -0.8479 -0.6719
Problem descriptionresample should work identically for DataArray and Dataset Expected Output
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/2362/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |