Skip to content

Commit 405fbc4

Browse files
TYP: Replace namedtuple with dataclass #40531 (#43107)
* TYP: Replace namedtuple with dataclass #40531 * Fixes from pre-commit [automated commit] * noop Co-authored-by: MarcoGorelli <[email protected]>
1 parent 098661e commit 405fbc4

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

pandas/core/groupby/base.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,15 @@
55
"""
66
from __future__ import annotations
77

8-
import collections
8+
import dataclasses
9+
from typing import Hashable
10+
11+
12+
@dataclasses.dataclass(order=True, frozen=True)
13+
class OutputKey:
14+
label: Hashable
15+
position: int
916

10-
OutputKey = collections.namedtuple("OutputKey", ["label", "position"])
1117

1218
# special case to prevent duplicate plots when catching exceptions when
1319
# forwarding methods from NDFrames

0 commit comments

Comments
 (0)