issue_comments: 394839627
This data as json
| html_url | issue_url | id | node_id | user | created_at | updated_at | author_association | body | reactions | performed_via_github_app | issue |
|---|---|---|---|---|---|---|---|---|---|---|---|
| https://github.com/pydata/xarray/issues/2191#issuecomment-394839627 | https://api.github.com/repos/pydata/xarray/issues/2191 | 394839627 | MDEyOklzc3VlQ29tbWVudDM5NDgzOTYyNw== | 6628425 | 2018-06-05T19:56:30Z | 2018-06-05T19:56:30Z | MEMBER | @naomi-henderson thanks! In the meantime here's a possible workaround, in case you haven't figured one out already: ```python import numpy as np import xarray as xr from cftime import num2date, DatetimeNoLeap times = num2date(np.arange(730), calendar='noleap', units='days since 0001-01-01') da = xr.DataArray(np.arange(730), coords=[times], dims=['time']) month_start = [DatetimeNoLeap(date.dt.year, date.dt.month, 1) for date in da.time] da['MS'] = xr.DataArray(month_start, coords=da.time.coords) resampled = da.groupby('MS').mean('time').rename({'MS': 'time'}) ``` |
{
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
327089588 |