@@ -10258,7 +10258,7 @@ def interp_calendar(
1025810258 def groupby (
1025910259 self ,
1026010260 group : (
10261- Hashable | DataArray | IndexVariable | Mapping [Hashable , Grouper ] | None
10261+ Hashable | DataArray | IndexVariable | Mapping [Any , Grouper ] | None
1026210262 ) = None ,
1026310263 squeeze : bool | None = None ,
1026410264 restore_coord_dims : bool = False ,
@@ -10268,18 +10268,19 @@ def groupby(
1026810268
1026910269 Parameters
1027010270 ----------
10271- group : Hashable, DataArray or IndexVariable
10271+ group : Hashable or DataArray or IndexVariable or mapping of Hashable to Grouper
1027210272 Array whose unique values should be used to group this array. If a
10273- string, must be the name of a variable contained in this dataset.
10273+ Hashable, must be the name of a coordinate contained in this dataarray. If a dictionary,
10274+ must map an existing variable name to a :py:class:`Grouper` instance.
1027410275 squeeze : bool, default: True
1027510276 If "group" is a dimension of any arrays in this dataset, `squeeze`
1027610277 controls whether the subarrays have a dimension of length 1 along
1027710278 that dimension or if the dimension is squeezed out.
1027810279 restore_coord_dims : bool, default: False
1027910280 If True, also restore the dimension order of multi-dimensional
1028010281 coordinates.
10281- **groupers : Mapping of hashable to Grouper or Resampler
10282- Mapping of variable name to group by to `` Grouper`` or `` Resampler` ` object.
10282+ **groupers : Mapping of str to Grouper or Resampler
10283+ Mapping of variable name to group by to :py:class:` Grouper` or :py:class:` Resampler` object.
1028310284 One of ``group`` or ``groupers`` must be provided.
1028410285 Only a single ``grouper`` is allowed at present.
1028510286
@@ -10318,7 +10319,7 @@ def groupby(
1031810319 _validate_groupby_squeeze (squeeze )
1031910320
1032010321 if isinstance (group , Mapping ):
10321- groupers = either_dict_or_kwargs (group , groupers , "groupby" )
10322+ groupers = either_dict_or_kwargs (group , groupers , "groupby" ) # type: ignore
1032210323 group = None
1032310324
1032410325 if group is not None :
@@ -10613,7 +10614,7 @@ def coarsen(
1061310614
1061410615 def resample (
1061510616 self ,
10616- indexer : Mapping [Hashable , str | Resampler ] | None = None ,
10617+ indexer : Mapping [Any , str | Resampler ] | None = None ,
1061710618 skipna : bool | None = None ,
1061810619 closed : SideOptions | None = None ,
1061910620 label : SideOptions | None = None ,
0 commit comments