Skip to content

Commit a56a407

Browse files
authored
refactor GroupBy internals (#9389)
* More tests * Refactoring GroupBy 1. Simplify ResolvedGrouper by moving logic to EncodedGroups 2. Stack outside ResolvedGrouper in GroupBy.__init__ to prepare for multi-variable GroupBy * bail on pandas 2.0
1 parent 4ab0679 commit a56a407

File tree

5 files changed

+238
-161
lines changed

5 files changed

+238
-161
lines changed

xarray/core/coordinates.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ def _construct_direct(
352352
return obj
353353

354354
@classmethod
355-
def from_pandas_multiindex(cls, midx: pd.MultiIndex, dim: str) -> Self:
355+
def from_pandas_multiindex(cls, midx: pd.MultiIndex, dim: Hashable) -> Self:
356356
"""Wrap a pandas multi-index as Xarray coordinates (dimension + levels).
357357
358358
The returned coordinates can be directly assigned to a

0 commit comments

Comments
 (0)