File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change 3232 Appender ,
3333 Substitution ,
3434 doc ,
35+ set_module ,
3536)
3637from pandas .util ._exceptions import find_stack_level
3738
108109ScalarResult = TypeVar ("ScalarResult" )
109110
110111
112+ @set_module ("pandas" )
111113class NamedAgg (NamedTuple ):
112114 """
113115 Helper for column specific aggregation with control over output column names.
@@ -142,6 +144,7 @@ class NamedAgg(NamedTuple):
142144 aggfunc : AggScalar
143145
144146
147+ @set_module ("pandas.api.typing" )
145148class SeriesGroupBy (GroupBy [Series ]):
146149 def _wrap_agged_manager (self , mgr : Manager ) -> Series :
147150 out = self .obj ._constructor_from_mgr (mgr , axes = mgr .axes )
@@ -1555,6 +1558,7 @@ def unique(self) -> Series:
15551558 return result
15561559
15571560
1561+ @set_module ("pandas.api.typing" )
15581562class DataFrameGroupBy (GroupBy [DataFrame ]):
15591563 _agg_examples_doc = dedent (
15601564 """
Original file line number Diff line number Diff line change @@ -420,3 +420,6 @@ def test_set_module():
420420 assert pd .Series .__module__ == "pandas"
421421 assert pd .date_range .__module__ == "pandas"
422422 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