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 1963071630,I_kwDOAMm_X851AhiO,8378,Extend DatetimeAccessor with `snap`-method,56583917,open,0,,,2,2023-10-26T09:16:24Z,2023-10-27T08:08:58Z,,CONTRIBUTOR,,,,"### Is your feature request related to a problem? With satellite remote sensing data, you sometimes end up with a blown up DataArray/Dataset because individual acquisitions have been saved in slices: ![group_acq_slices_1](https://github.com/pydata/xarray/assets/56583917/e439c153-b0f6-4025-85b2-9b31e1daf784) One could then aggregate these slices with something like this: ```python ds.coords['time'] = ds.time.dt.floor('1H') # or .ceil ds = ds_copy.groupby('time').mean() ``` However, this would miss cases where one slice has been acquired before and the other after a specific hour. The [`pandas.DatetimeIndex.snap`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DatetimeIndex.snap.html) method could be a good alternative for such cases. ### Describe the solution you'd like In addition to the [`floor`](https://docs.xarray.dev/en/stable/generated/xarray.DataArray.dt.floor.html), [`ceil`](https://docs.xarray.dev/en/stable/generated/xarray.DataArray.dt.ceil.html) and [`round`](https://docs.xarray.dev/en/stable/generated/xarray.DataArray.dt.round.html) methods, it would be great to also implement [`pandas.DatetimeIndex.snap`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DatetimeIndex.snap.html). ### Describe alternatives you've considered _No response_ ### Additional context _No response_","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8378/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,issue 1497131525,I_kwDOAMm_X85ZPGoF,7378,Improve docstrings for better discoverability,56583917,open,0,,,9,2022-12-14T17:59:20Z,2023-04-02T04:26:57Z,,CONTRIBUTOR,,,,"### What is your issue? I noticed that the docstrings of the [aggregation methods](https://docs.xarray.dev/en/stable/api.html#aggregation) are mostly written in the same style, e.g.: ""Reduce this Dataset's data by applying xy along some dimension(s)."". Let's say a user is interested in calculating the variance and searches for the appropriate method. Neither [xarray.DataArray.var](https://docs.xarray.dev/en/stable/generated/xarray.DataArray.var.html#xarray.DataArray.var) nor [xarray.Dataset.var](https://docs.xarray.dev/en/stable/generated/xarray.Dataset.var.html#xarray.Dataset.var) will be returned (see [here](https://docs.xarray.dev/en/stable/search.html?q=variance#)), because ""variance"" is not mentioned at all in the docstrings. Same problem exists for other methods like `.std`, `.prod`, `.cumsum`, `.cumprod`, and probably others. https://github.com/pydata/xarray/issues/6793 is related, but I guess it already has enough tasks.","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/7378/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,issue