File tree 2 files changed +15
-3
lines changed
2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change 35
35
from pandas .core .arrays .base import ExtensionArray # noqa: F401
36
36
from pandas .core .frame import DataFrame
37
37
from pandas .core .generic import NDFrame # noqa: F401
38
+ from pandas .core .groupby .generic import DataFrameGroupBy , SeriesGroupBy
38
39
from pandas .core .indexes .base import Index
40
+ from pandas .core .resample import Resampler
39
41
from pandas .core .series import Series
42
+ from pandas .core .window .rolling import BaseWindow
40
43
41
44
from pandas .io .formats .format import EngFormatter
42
45
115
118
List [AggFuncTypeBase ],
116
119
AggFuncTypeDict ,
117
120
]
121
+ AggObjType = Union [
122
+ "Series" ,
123
+ "DataFrame" ,
124
+ "SeriesGroupBy" ,
125
+ "DataFrameGroupBy" ,
126
+ "BaseWindow" ,
127
+ "Resampler" ,
128
+ ]
118
129
119
130
120
131
# for arbitrary kwargs passed during reading/writing files
Original file line number Diff line number Diff line change 24
24
AggFuncType ,
25
25
AggFuncTypeBase ,
26
26
AggFuncTypeDict ,
27
+ AggObjType ,
27
28
Axis ,
28
29
FrameOrSeries ,
29
30
FrameOrSeriesUnion ,
@@ -530,7 +531,7 @@ def transform_str_or_callable(
530
531
531
532
532
533
def aggregate (
533
- obj ,
534
+ obj : AggObjType ,
534
535
arg : AggFuncType ,
535
536
* args ,
536
537
** kwargs ,
@@ -580,7 +581,7 @@ def aggregate(
580
581
581
582
582
583
def agg_list_like (
583
- obj ,
584
+ obj : AggObjType ,
584
585
arg : List [AggFuncTypeBase ],
585
586
_axis : int ,
586
587
) -> FrameOrSeriesUnion :
@@ -672,7 +673,7 @@ def agg_list_like(
672
673
673
674
674
675
def agg_dict_like (
675
- obj ,
676
+ obj : AggObjType ,
676
677
arg : AggFuncTypeDict ,
677
678
_axis : int ,
678
679
) -> FrameOrSeriesUnion :
You can’t perform that action at this time.
0 commit comments