Skip to content

Commit 44f70c8

Browse files
committed
change NDFrame to FrameOrSeries
1 parent 18f1516 commit 44f70c8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pandas/core/groupby/grouper.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
from pandas.core.arrays import Categorical, ExtensionArray
2727
import pandas.core.common as com
2828
from pandas.core.frame import DataFrame
29-
from pandas.core.generic import NDFrame
3029
from pandas.core.groupby.categorical import recode_for_groupby, recode_from_groupby
3130
from pandas.core.groupby.ops import BaseGrouper
3231
from pandas.core.index import CategoricalIndex, Index, MultiIndex
@@ -430,15 +429,15 @@ def groups(self) -> dict:
430429

431430

432431
def get_grouper(
433-
obj: NDFrame,
432+
obj: FrameOrSeries,
434433
key=None,
435434
axis: int = 0,
436435
level=None,
437436
sort=True,
438437
observed=False,
439438
mutated=False,
440439
validate=True,
441-
) -> Tuple[BaseGrouper, List[Hashable], NDFrame]:
440+
) -> Tuple[BaseGrouper, List[Hashable], FrameOrSeries]:
442441
"""
443442
Create and return a BaseGrouper, which is an internal
444443
mapping of how to create the grouper indexers.

0 commit comments

Comments
 (0)