issue_comments: 395082238
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-395082238 | https://api.github.com/repos/pydata/xarray/issues/2191 | 395082238 | MDEyOklzc3VlQ29tbWVudDM5NTA4MjIzOA== | 6628425 | 2018-06-06T14:09:56Z | 2018-10-19T19:38:56Z | MEMBER | When the time coordinate contains I think the most general workaround for right now would probably look something like the example below. This has the property that it preserves the underlying calendar type of the time index. ```python import pandas as pd import xarray as xr def resample_ms_freq(ds, dim='time'): """Resample the dataset to 'MS' frequency regardless of the calendar used.
with xr.set_options(enable_cftimeindex=True): ds = xr.open_mfdataset(files) resampled = resample_ms_freq(ds) ``` |
{ "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
327089588 |