Skip to content

Commit f6ba50a

Browse files
authored
TYP: fix type of level in DataFrame.groupby (#47560)
1 parent ebc96ae commit f6ba50a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pandas/_typing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109

110110
Axis = Union[str, int]
111111
IndexLabel = Union[Hashable, Sequence[Hashable]]
112-
Level = Union[Hashable, int]
112+
Level = Hashable
113113
Shape = Tuple[int, ...]
114114
Suffixes = Tuple[Optional[str], Optional[str]]
115115
Ordered = Optional[bool]

pandas/core/frame.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8125,7 +8125,7 @@ def groupby(
81258125
self,
81268126
by=None,
81278127
axis: Axis = 0,
8128-
level: Level | None = None,
8128+
level: IndexLabel | None = None,
81298129
as_index: bool = True,
81308130
sort: bool = True,
81318131
group_keys: bool | lib.NoDefault = no_default,

0 commit comments

Comments
 (0)