@@ -12,9 +12,7 @@ from re import Pattern
12
12
from typing import (
13
13
Any ,
14
14
ClassVar ,
15
- Generic ,
16
15
Literal ,
17
- TypeVar ,
18
16
overload ,
19
17
)
20
18
@@ -27,10 +25,7 @@ from pandas import (
27
25
)
28
26
from pandas .core .arraylike import OpsMixin
29
27
from pandas .core .generic import NDFrame
30
- from pandas .core .groupby .generic import (
31
- DataFrameGroupBy ,
32
- SeriesGroupBy ,
33
- )
28
+ from pandas .core .groupby .generic import DataFrameGroupBy
34
29
from pandas .core .groupby .grouper import Grouper
35
30
from pandas .core .indexers import BaseIndexer
36
31
from pandas .core .indexes .base import Index
@@ -79,7 +74,6 @@ from pandas._typing import (
79
74
Axis ,
80
75
AxisColumn ,
81
76
AxisIndex ,
82
- ByT ,
83
77
CalculationMethod ,
84
78
ColspaceArgType ,
85
79
CompressionOptions ,
@@ -235,11 +229,6 @@ class _LocIndexerFrame(_LocIndexer):
235
229
value : Scalar | NAType | NaTType | ArrayLike | Series | list | None ,
236
230
) -> None : ...
237
231
238
- _TT = TypeVar ("TT" , bound = Literal [True , False ])
239
-
240
- class DataFrameGroupByGen (DataFrameGroupBy [ByT ], Generic [ByT , _TT ]): ...
241
- class SeriesGroupByGen (SeriesGroupBy , Generic [_TT , ByT ]): ...
242
-
243
232
class DataFrame (NDFrame , OpsMixin ):
244
233
__hash__ : ClassVar [None ] # type: ignore[assignment]
245
234
@@ -1073,7 +1062,7 @@ class DataFrame(NDFrame, OpsMixin):
1073
1062
group_keys : _bool = ...,
1074
1063
observed : _bool | NoDefault = ...,
1075
1064
dropna : _bool = ...,
1076
- ) -> DataFrameGroupByGen [Scalar , Literal [True ]]: ...
1065
+ ) -> DataFrameGroupBy [Scalar , Literal [True ]]: ...
1077
1066
@overload
1078
1067
def groupby (
1079
1068
self ,
@@ -1085,7 +1074,7 @@ class DataFrame(NDFrame, OpsMixin):
1085
1074
group_keys : _bool = ...,
1086
1075
observed : _bool | NoDefault = ...,
1087
1076
dropna : _bool = ...,
1088
- ) -> DataFrameGroupByGen [Scalar , Literal [False ]]: ...
1077
+ ) -> DataFrameGroupBy [Scalar , Literal [False ]]: ...
1089
1078
@overload
1090
1079
def groupby (
1091
1080
self ,
@@ -1097,7 +1086,7 @@ class DataFrame(NDFrame, OpsMixin):
1097
1086
group_keys : _bool = ...,
1098
1087
observed : _bool | NoDefault = ...,
1099
1088
dropna : _bool = ...,
1100
- ) -> DataFrameGroupBy [Timestamp ]: ...
1089
+ ) -> DataFrameGroupBy [Timestamp , bool ]: ...
1101
1090
@overload
1102
1091
def groupby (
1103
1092
self ,
@@ -1109,7 +1098,7 @@ class DataFrame(NDFrame, OpsMixin):
1109
1098
group_keys : _bool = ...,
1110
1099
observed : _bool | NoDefault = ...,
1111
1100
dropna : _bool = ...,
1112
- ) -> DataFrameGroupBy [Timedelta ]: ...
1101
+ ) -> DataFrameGroupBy [Timedelta , bool ]: ...
1113
1102
@overload
1114
1103
def groupby (
1115
1104
self ,
@@ -1121,7 +1110,7 @@ class DataFrame(NDFrame, OpsMixin):
1121
1110
group_keys : _bool = ...,
1122
1111
observed : _bool | NoDefault = ...,
1123
1112
dropna : _bool = ...,
1124
- ) -> DataFrameGroupBy [Period ]: ...
1113
+ ) -> DataFrameGroupBy [Period , bool ]: ...
1125
1114
@overload
1126
1115
def groupby (
1127
1116
self ,
@@ -1133,7 +1122,7 @@ class DataFrame(NDFrame, OpsMixin):
1133
1122
group_keys : _bool = ...,
1134
1123
observed : _bool | NoDefault = ...,
1135
1124
dropna : _bool = ...,
1136
- ) -> DataFrameGroupBy [IntervalT ]: ...
1125
+ ) -> DataFrameGroupBy [IntervalT , bool ]: ...
1137
1126
@overload
1138
1127
def groupby (
1139
1128
self ,
@@ -1145,7 +1134,7 @@ class DataFrame(NDFrame, OpsMixin):
1145
1134
group_keys : _bool = ...,
1146
1135
observed : _bool | NoDefault = ...,
1147
1136
dropna : _bool = ...,
1148
- ) -> DataFrameGroupBy [tuple ]: ...
1137
+ ) -> DataFrameGroupBy [tuple , bool ]: ...
1149
1138
@overload
1150
1139
def groupby (
1151
1140
self ,
@@ -1157,7 +1146,7 @@ class DataFrame(NDFrame, OpsMixin):
1157
1146
group_keys : _bool = ...,
1158
1147
observed : _bool | NoDefault = ...,
1159
1148
dropna : _bool = ...,
1160
- ) -> DataFrameGroupBy [SeriesByT ]: ...
1149
+ ) -> DataFrameGroupBy [SeriesByT , bool ]: ...
1161
1150
@overload
1162
1151
def groupby (
1163
1152
self ,
@@ -1169,7 +1158,7 @@ class DataFrame(NDFrame, OpsMixin):
1169
1158
group_keys : _bool = ...,
1170
1159
observed : _bool | NoDefault = ...,
1171
1160
dropna : _bool = ...,
1172
- ) -> DataFrameGroupBy [Any ]: ...
1161
+ ) -> DataFrameGroupBy [Any , bool ]: ...
1173
1162
def pivot (
1174
1163
self ,
1175
1164
* ,
0 commit comments