Skip to content

Commit b264dc1

Browse files
committed
Refactoring GroupBy
1. Simplify ResolvedGrouper by moving logic to EncodedGroups 2. Stack outside ResolvedGrouper in GroupBy.__init__ to prepare for multi-variable GroupBy
1 parent 3107484 commit b264dc1

File tree

4 files changed

+200
-160
lines changed

4 files changed

+200
-160
lines changed

xarray/core/coordinates.py

Lines changed: 1 addition & 1 deletion
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)