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 1931401581,I_kwDOAMm_X85zHtlt,8282,Resampler giving grouper error with pandas 2,51638288,closed,0,,,2,2023-10-07T15:57:12Z,2023-10-07T19:03:09Z,2023-10-07T19:03:09Z,NONE,,,,"### What happened? I was trying to resample an xarray DataArray to get the mean values of the array at N-second intervals (I have used the value 20 in the example). My DataArray had two co-ordinates, ""time"" and ""LAT_GIN"" with one dimension: time. This failed with the error below. When I downgraded pandas from 2.1.0 to 1.5.3 (without changing the xarray version), it worked. I was advised on [StackOverflow](https://stackoverflow.com/questions/77173874/how-to-perform-resampling-in-xarray-without-pandas-grouper-error) to report this here rather than on the pandas github. ### What did you expect to happen? I expected a DataArray resampled every N seconds (here 5 values in the resampled array = 100/20), where the LAT_GIN co-ordinate has also been averaged over each of the sample periods. I was able to get this with pandas 1.5.3. ### Minimal Complete Verifiable Example ```Python start_time = pd.Timestamp(""2023-09-25 12:34:56"") time_values = pd.date_range(start_time, periods=100, freq=""1S"") lat_values = np.random.rand(100).astype(np.float32) da = xr.DataArray(lat_values, coords={'time': time_values}, dims=['time']) da.coords['LAT_GIN'] = xr.Variable(('time',), lat_values) da.resample(time='20S').mean() ``` ### MVCE confirmation - [X] Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue in xarray. - [X] Complete example — the example is self-contained, including all data and the text of any traceback. - [X] Verifiable example — the example copy & pastes into an IPython prompt or [Binder notebook](https://mybinder.org/v2/gh/pydata/xarray/main?urlpath=lab/tree/doc/examples/blank_template.ipynb), returning the result. - [X] New issue — a search of GitHub Issues suggests this is not a duplicate. ### Relevant log output ```Python TypeError: Grouper.__init__() got an unexpected keyword argument 'base' ``` ### Anything else we need to know? _No response_ ### Environment
INSTALLED VERSIONS ------------------ commit: None python: 3.10.5 | packaged by conda-forge | (main, Jun 14 2022, 07:04:59) [GCC 10.3.0] python-bits: 64 OS: Linux OS-release: 3.10.0-1160.95.1.el7.x86_64 machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: None LOCALE: ('en_US', 'UTF-8') libhdf5: 1.12.2 libnetcdf: 4.9.3-development xarray: 2022.6.0 pandas: 2.1.0 numpy: 1.26.0 scipy: 1.11.2 netCDF4: 1.6.4 pydap: None h5netcdf: None h5py: None Nio: None zarr: None cftime: 1.6.2 nc_time_axis: None PseudoNetCDF: None rasterio: None cfgrib: None iris: None bottleneck: None dask: None distributed: None matplotlib: 3.7.3 cartopy: 0.22.0 seaborn: None numbagg: None fsspec: None cupy: None pint: None sparse: None flox: None numpy_groupies: None setuptools: 58.1.0 pip: 22.0.4 conda: None pytest: None IPython: 8.15.0 sphinx: None
","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8282/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,not_planned,13221727,issue