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/2695#issuecomment-456666796,https://api.github.com/repos/pydata/xarray/issues/2695,456666796,MDEyOklzc3VlQ29tbWVudDQ1NjY2Njc5Ng==,1217238,2019-01-23T04:32:34Z,2019-01-23T04:32:34Z,MEMBER,"Tolerance sounds like a nice feature to add to me. You might consider adding it to pandas, too.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,401392318 https://github.com/pydata/xarray/issues/2695#issuecomment-456239824,https://api.github.com/repos/pydata/xarray/issues/2695,456239824,MDEyOklzc3VlQ29tbWVudDQ1NjIzOTgyNA==,43613877,2019-01-22T01:25:55Z,2019-01-22T01:25:55Z,CONTRIBUTOR,"Thanks for the clarification! I think the `tolerance` argument might even be superior to the `limit` or to say the least, the resample methods would benefit from any of these arguments. My above mentioned changes to the code, despite mixing up `limit` and `tolerance`, actually seem to implement the `tolerance` argument. ```python import xarray as xr 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) xdf = xr.Dataset.from_dataframe(df) xdf.resample({'index':'1H'}).nearest(tolerance=dt.timedelta(hours=2)) ``` would lead to ``` Dimensions: (index: 25) Coordinates: * index (index) datetime64[ns] 2018-01-01 ... 2018-01-02 Data variables: 0 (index) float64 10.0 10.0 10.0 nan nan ... nan nan 20.0 20.0 20.0 ``` Would that be helpful to include and write a pull request?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,401392318 https://github.com/pydata/xarray/issues/2695#issuecomment-456155618,https://api.github.com/repos/pydata/xarray/issues/2695,456155618,MDEyOklzc3VlQ29tbWVudDQ1NjE1NTYxOA==,1217238,2019-01-21T17:55:52Z,2019-01-21T17:55:52Z,MEMBER,"I think this would be a welcome feature, but I think there's an important difference between `limit` and `tolerance` in pandas that would make this a it more complicated to implement: - `tolerance` is specified in units matching the index. - `limit` is specified as an integer number of positions.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,401392318