@@ -1005,10 +1005,14 @@ def asfreq(self, fill_value=None):
1005
1005
return self ._upsample ("asfreq" , fill_value = fill_value )
1006
1006
1007
1007
@final
1008
+ @doc (GroupBy .sum )
1008
1009
def sum (
1009
1010
self ,
1010
1011
numeric_only : bool = False ,
1011
1012
min_count : int = 0 ,
1013
+ skipna : bool = True ,
1014
+ engine : Literal ["cython" , "numba" ] | None = None ,
1015
+ engine_kwargs : dict [str , bool ] | None = None ,
1012
1016
):
1013
1017
"""
1014
1018
Compute sum of group values.
@@ -1050,14 +1054,18 @@ def sum(
1050
1054
2023-02-01 7
1051
1055
Freq: MS, dtype: int64
1052
1056
"""
1053
- return self ._downsample ("sum" , numeric_only = numeric_only , min_count = min_count )
1057
+ return self ._downsample (
1058
+ "sum" ,
1059
+ numeric_only = numeric_only ,
1060
+ min_count = min_count ,
1061
+ skipna = skipna ,
1062
+ engine = engine ,
1063
+ engine_kwargs = engine_kwargs ,
1064
+ )
1054
1065
1055
1066
@final
1056
- def prod (
1057
- self ,
1058
- numeric_only : bool = False ,
1059
- min_count : int = 0 ,
1060
- ):
1067
+ @doc (GroupBy .prod )
1068
+ def prod (self , numeric_only : bool = False , min_count : int = 0 , skipna : bool = True ):
1061
1069
"""
1062
1070
Compute prod of group values.
1063
1071
@@ -1098,13 +1106,19 @@ def prod(
1098
1106
2023-02-01 12
1099
1107
Freq: MS, dtype: int64
1100
1108
"""
1101
- return self ._downsample ("prod" , numeric_only = numeric_only , min_count = min_count )
1109
+ return self ._downsample (
1110
+ "prod" , numeric_only = numeric_only , min_count = min_count , skipna = skipna
1111
+ )
1102
1112
1103
1113
@final
1114
+ @doc (GroupBy .min )
1104
1115
def min (
1105
1116
self ,
1106
1117
numeric_only : bool = False ,
1107
- min_count : int = 0 ,
1118
+ min_count : int = - 1 ,
1119
+ skipna : bool = True ,
1120
+ engine : Literal ["cython" , "numba" ] | None = None ,
1121
+ engine_kwargs : dict [str , bool ] | None = None ,
1108
1122
):
1109
1123
"""
1110
1124
Compute min value of group.
@@ -1132,13 +1146,24 @@ def min(
1132
1146
2023-02-01 3
1133
1147
Freq: MS, dtype: int64
1134
1148
"""
1135
- return self ._downsample ("min" , numeric_only = numeric_only , min_count = min_count )
1149
+ return self ._downsample (
1150
+ "min" ,
1151
+ numeric_only = numeric_only ,
1152
+ min_count = min_count ,
1153
+ skipna = skipna ,
1154
+ engine = engine ,
1155
+ engine_kwargs = engine_kwargs ,
1156
+ )
1136
1157
1137
1158
@final
1159
+ @doc (GroupBy .max )
1138
1160
def max (
1139
1161
self ,
1140
1162
numeric_only : bool = False ,
1141
- min_count : int = 0 ,
1163
+ min_count : int = - 1 ,
1164
+ skipna : bool = True ,
1165
+ engine : Literal ["cython" , "numba" ] | None = None ,
1166
+ engine_kwargs : dict [str , bool ] | None = None ,
1142
1167
):
1143
1168
"""
1144
1169
Compute max value of group.
@@ -1166,7 +1191,14 @@ def max(
1166
1191
2023-02-01 4
1167
1192
Freq: MS, dtype: int64
1168
1193
"""
1169
- return self ._downsample ("max" , numeric_only = numeric_only , min_count = min_count )
1194
+ return self ._downsample (
1195
+ "max" ,
1196
+ numeric_only = numeric_only ,
1197
+ min_count = min_count ,
1198
+ skipna = skipna ,
1199
+ engine = engine ,
1200
+ engine_kwargs = engine_kwargs ,
1201
+ )
1170
1202
1171
1203
@final
1172
1204
@doc (GroupBy .first )
@@ -1201,87 +1233,6 @@ def median(
1201
1233
):
1202
1234
return self ._downsample ("median" , numeric_only = numeric_only , skipna = skipna )
1203
1235
1204
- @final
1205
- @doc (GroupBy .mean )
1206
- def mean (
1207
- self ,
1208
- numeric_only : bool = False ,
1209
- skipna : bool = True ,
1210
- engine : Literal ["cython" , "numba" ] | None = None ,
1211
- engine_kwargs : dict [str , bool ] | None = None ,
1212
- ):
1213
- return self ._downsample (
1214
- "mean" ,
1215
- numeric_only = numeric_only ,
1216
- skipna = skipna ,
1217
- engine = engine ,
1218
- engine_kwargs = engine_kwargs ,
1219
- )
1220
-
1221
- @final
1222
- @doc (GroupBy .min )
1223
- def min (
1224
- self ,
1225
- numeric_only : bool = False ,
1226
- min_count : int = - 1 ,
1227
- skipna : bool = True ,
1228
- engine : Literal ["cython" , "numba" ] | None = None ,
1229
- engine_kwargs : dict [str , bool ] | None = None ,
1230
- ):
1231
- return self ._downsample (
1232
- "min" ,
1233
- numeric_only = numeric_only ,
1234
- min_count = min_count ,
1235
- skipna = skipna ,
1236
- engine = engine ,
1237
- engine_kwargs = engine_kwargs ,
1238
- )
1239
-
1240
- @final
1241
- @doc (GroupBy .max )
1242
- def max (
1243
- self ,
1244
- numeric_only : bool = False ,
1245
- min_count : int = - 1 ,
1246
- skipna : bool = True ,
1247
- engine : Literal ["cython" , "numba" ] | None = None ,
1248
- engine_kwargs : dict [str , bool ] | None = None ,
1249
- ):
1250
- return self ._downsample (
1251
- "max" ,
1252
- numeric_only = numeric_only ,
1253
- min_count = min_count ,
1254
- skipna = skipna ,
1255
- engine = engine ,
1256
- engine_kwargs = engine_kwargs ,
1257
- )
1258
-
1259
- @final
1260
- @doc (GroupBy .sum )
1261
- def sum (
1262
- self ,
1263
- numeric_only : bool = False ,
1264
- min_count : int = 0 ,
1265
- skipna : bool = True ,
1266
- engine : Literal ["cython" , "numba" ] | None = None ,
1267
- engine_kwargs : dict [str , bool ] | None = None ,
1268
- ):
1269
- return self ._downsample (
1270
- "sum" ,
1271
- numeric_only = numeric_only ,
1272
- min_count = min_count ,
1273
- skipna = skipna ,
1274
- engine = engine ,
1275
- engine_kwargs = engine_kwargs ,
1276
- )
1277
-
1278
- @final
1279
- @doc (GroupBy .prod )
1280
- def prod (self , numeric_only : bool = False , min_count : int = 0 , skipna : bool = True ):
1281
- return self ._downsample (
1282
- "prod" , numeric_only = numeric_only , min_count = min_count , skipna = skipna
1283
- )
1284
-
1285
1236
@final
1286
1237
@doc (GroupBy .any )
1287
1238
def any (self , skipna : bool = True ):
@@ -1293,9 +1244,13 @@ def all(self, skipna: bool = True):
1293
1244
return self ._downsample ("all" , skipna = skipna )
1294
1245
1295
1246
@final
1247
+ @doc (GroupBy .mean )
1296
1248
def mean (
1297
1249
self ,
1298
1250
numeric_only : bool = False ,
1251
+ skipna : bool = True ,
1252
+ engine : Literal ["cython" , "numba" ] | None = None ,
1253
+ engine_kwargs : dict [str , bool ] | None = None ,
1299
1254
):
1300
1255
"""
1301
1256
Compute mean of groups, excluding missing values.
@@ -1334,13 +1289,23 @@ def mean(
1334
1289
2023-02-01 3.5
1335
1290
Freq: MS, dtype: float64
1336
1291
"""
1337
- return self ._downsample ("mean" , numeric_only = numeric_only )
1292
+ return self ._downsample (
1293
+ "mean" ,
1294
+ numeric_only = numeric_only ,
1295
+ skipna = skipna ,
1296
+ engine = engine ,
1297
+ engine_kwargs = engine_kwargs ,
1298
+ )
1338
1299
1339
1300
@final
1301
+ @doc (GroupBy .std )
1340
1302
def std (
1341
1303
self ,
1342
1304
ddof : int = 1 ,
1305
+ engine : Literal ["cython" , "numba" ] | None = None ,
1306
+ engine_kwargs : dict [str , bool ] | None = None ,
1343
1307
numeric_only : bool = False ,
1308
+ skipna : bool = True ,
1344
1309
):
1345
1310
"""
1346
1311
Compute standard deviation of groups, excluding missing values.
@@ -1384,13 +1349,24 @@ def std(
1384
1349
2023-02-01 2.645751
1385
1350
Freq: MS, dtype: float64
1386
1351
"""
1387
- return self ._downsample ("std" , ddof = ddof , numeric_only = numeric_only )
1352
+ return self ._downsample (
1353
+ "std" ,
1354
+ ddof = ddof ,
1355
+ engine = engine ,
1356
+ engine_kwargs = engine_kwargs ,
1357
+ numeric_only = numeric_only ,
1358
+ skipna = skipna ,
1359
+ )
1388
1360
1389
1361
@final
1362
+ @doc (GroupBy .var )
1390
1363
def var (
1391
1364
self ,
1392
1365
ddof : int = 1 ,
1366
+ engine : Literal ["cython" , "numba" ] | None = None ,
1367
+ engine_kwargs : dict [str , bool ] | None = None ,
1393
1368
numeric_only : bool = False ,
1369
+ skipna : bool = True ,
1394
1370
):
1395
1371
"""
1396
1372
Compute variance of groups, excluding missing values.
@@ -1440,37 +1416,6 @@ def var(
1440
1416
2023-02-01 4.666667
1441
1417
Freq: MS, dtype: float64
1442
1418
"""
1443
- return self ._downsample ("var" , ddof = ddof , numeric_only = numeric_only )
1444
-
1445
- @final
1446
- @doc (GroupBy .std )
1447
- def std (
1448
- self ,
1449
- ddof : int = 1 ,
1450
- engine : Literal ["cython" , "numba" ] | None = None ,
1451
- engine_kwargs : dict [str , bool ] | None = None ,
1452
- numeric_only : bool = False ,
1453
- skipna : bool = True ,
1454
- ):
1455
- return self ._downsample (
1456
- "std" ,
1457
- ddof = ddof ,
1458
- engine = engine ,
1459
- engine_kwargs = engine_kwargs ,
1460
- numeric_only = numeric_only ,
1461
- skipna = skipna ,
1462
- )
1463
-
1464
- @final
1465
- @doc (GroupBy .var )
1466
- def var (
1467
- self ,
1468
- ddof : int = 1 ,
1469
- engine : Literal ["cython" , "numba" ] | None = None ,
1470
- engine_kwargs : dict [str , bool ] | None = None ,
1471
- numeric_only : bool = False ,
1472
- skipna : bool = True ,
1473
- ):
1474
1419
return self ._downsample (
1475
1420
"var" ,
1476
1421
ddof = ddof ,
0 commit comments