File tree 2 files changed +7
-0
lines changed
2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change 32
32
Appender ,
33
33
Substitution ,
34
34
doc ,
35
+ set_module ,
35
36
)
36
37
from pandas .util ._exceptions import find_stack_level
37
38
108
109
ScalarResult = TypeVar ("ScalarResult" )
109
110
110
111
112
+ @set_module ("pandas" )
111
113
class NamedAgg (NamedTuple ):
112
114
"""
113
115
Helper for column specific aggregation with control over output column names.
@@ -142,6 +144,7 @@ class NamedAgg(NamedTuple):
142
144
aggfunc : AggScalar
143
145
144
146
147
+ @set_module ("pandas.api.typing" )
145
148
class SeriesGroupBy (GroupBy [Series ]):
146
149
def _wrap_agged_manager (self , mgr : Manager ) -> Series :
147
150
out = self .obj ._constructor_from_mgr (mgr , axes = mgr .axes )
@@ -1555,6 +1558,7 @@ def unique(self) -> Series:
1555
1558
return result
1556
1559
1557
1560
1561
+ @set_module ("pandas.api.typing" )
1558
1562
class DataFrameGroupBy (GroupBy [DataFrame ]):
1559
1563
_agg_examples_doc = dedent (
1560
1564
"""
Original file line number Diff line number Diff line change @@ -420,3 +420,6 @@ def test_set_module():
420
420
assert pd .Series .__module__ == "pandas"
421
421
assert pd .date_range .__module__ == "pandas"
422
422
assert pd .bdate_range .__module__ == "pandas"
423
+ assert pd .NamedAgg .__module__ == "pandas"
424
+ assert api .typing .SeriesGroupBy .__module__ == "pandas.api.typing"
425
+ assert api .typing .DataFrameGroupBy .__module__ == "pandas.api.typing"
You can’t perform that action at this time.
0 commit comments