issues: 401392318
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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 401392318 | MDU6SXNzdWU0MDEzOTIzMTg= | 2695 | Resample with limit/tolerance | 43613877 | closed | 0 | 3 | 2019-01-21T15:04:30Z | 2019-01-31T17:28:09Z | 2019-01-31T17:28:09Z | CONTRIBUTOR | Upsampling methods cannot be limitedIt is comes very handy to limit the scope of the resample method e.g. ```python import pandas as pd import datetime as dt dates=[dt.datetime(2018,1,1), dt.datetime(2018,1,2)] data=[10,20] df=pd.DataFrame(data,index=dates) df.resample('1H').nearest(limit=1) ``` This leads to
Currently:
Problem descriptionThis is very helpful, as one might not want to fill gaps with the /xarray/core/resample.py
and
So I think, with the Current Output```python import xarray as xr
However, it would be nice, if the following would work: ```python xdf.resample({'index':'1H'}).nearest(limit=1) <xarray.Dataset> Dimensions: (index: 25) Coordinates: * index (index) datetime64[ns] 2018-01-01 ... 2018-01-02 Data variables: 0 (index) float64 10.0 10.0 nan nan nan nan ... nan nan nan 20.0 20.0 ``` |
{
"url": "https://api.github.com/repos/pydata/xarray/issues/2695/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
completed | 13221727 | issue |