@@ -1250,12 +1250,12 @@ class DataFrame(NDFrame, OpsMixin):
1250
1250
@overload
1251
1251
def apply (
1252
1252
self ,
1253
- f : Callable [..., ListLikeExceptSeriesAndStr | Series ],
1253
+ f : Callable [..., ListLikeExceptSeriesAndStr | Series [ Any ] ],
1254
1254
axis : AxisIndex = ...,
1255
1255
raw : _bool = ...,
1256
1256
result_type : None = ...,
1257
- args = ...,
1258
- ** kwargs ,
1257
+ args : Any = ...,
1258
+ ** kwargs : Any ,
1259
1259
) -> DataFrame : ...
1260
1260
@overload
1261
1261
def apply (
@@ -1264,21 +1264,21 @@ class DataFrame(NDFrame, OpsMixin):
1264
1264
axis : AxisIndex = ...,
1265
1265
raw : _bool = ...,
1266
1266
result_type : None = ...,
1267
- args = ...,
1268
- ** kwargs ,
1267
+ args : Any = ...,
1268
+ ** kwargs : Any ,
1269
1269
) -> Series [S1 ]: ...
1270
1270
# Since non-scalar type T is not supported in Series[T],
1271
1271
# we separate this overload from the above one
1272
1272
@overload
1273
1273
def apply (
1274
1274
self ,
1275
- f : Callable [..., Mapping ],
1275
+ f : Callable [..., Mapping [ Any , Any ] ],
1276
1276
axis : AxisIndex = ...,
1277
1277
raw : _bool = ...,
1278
1278
result_type : None = ...,
1279
- args = ...,
1280
- ** kwargs ,
1281
- ) -> Series : ...
1279
+ args : Any = ...,
1280
+ ** kwargs : Any ,
1281
+ ) -> Series [ Any ] : ...
1282
1282
1283
1283
# apply() overloads with keyword result_type, and axis does not matter
1284
1284
@overload
@@ -1287,57 +1287,59 @@ class DataFrame(NDFrame, OpsMixin):
1287
1287
f : Callable [..., S1 ],
1288
1288
axis : Axis = ...,
1289
1289
raw : _bool = ...,
1290
- args = ...,
1290
+ args : Any = ...,
1291
1291
* ,
1292
1292
result_type : Literal ["expand" , "reduce" ],
1293
- ** kwargs ,
1293
+ ** kwargs : Any ,
1294
1294
) -> Series [S1 ]: ...
1295
1295
@overload
1296
1296
def apply (
1297
1297
self ,
1298
- f : Callable [..., ListLikeExceptSeriesAndStr | Series | Mapping ],
1298
+ f : Callable [..., ListLikeExceptSeriesAndStr | Series [ Any ] | Mapping [ Any , Any ] ],
1299
1299
axis : Axis = ...,
1300
1300
raw : _bool = ...,
1301
- args = ...,
1301
+ args : Any = ...,
1302
1302
* ,
1303
1303
result_type : Literal ["expand" ],
1304
- ** kwargs ,
1304
+ ** kwargs : Any ,
1305
1305
) -> DataFrame : ...
1306
1306
@overload
1307
1307
def apply (
1308
1308
self ,
1309
- f : Callable [..., ListLikeExceptSeriesAndStr | Mapping ],
1309
+ f : Callable [..., ListLikeExceptSeriesAndStr | Mapping [ Any , Any ] ],
1310
1310
axis : Axis = ...,
1311
1311
raw : _bool = ...,
1312
- args = ...,
1312
+ args : Any = ...,
1313
1313
* ,
1314
1314
result_type : Literal ["reduce" ],
1315
- ** kwargs ,
1316
- ) -> Series : ...
1315
+ ** kwargs : Any ,
1316
+ ) -> Series [ Any ] : ...
1317
1317
@overload
1318
1318
def apply (
1319
1319
self ,
1320
- f : Callable [..., ListLikeExceptSeriesAndStr | Series | Scalar | Mapping ],
1320
+ f : Callable [
1321
+ ..., ListLikeExceptSeriesAndStr | Series [Any ] | Scalar | Mapping [Any , Any ]
1322
+ ],
1321
1323
axis : Axis = ...,
1322
1324
raw : _bool = ...,
1323
- args = ...,
1325
+ args : Any = ...,
1324
1326
* ,
1325
1327
result_type : Literal ["broadcast" ],
1326
- ** kwargs ,
1328
+ ** kwargs : Any ,
1327
1329
) -> DataFrame : ...
1328
1330
1329
1331
# apply() overloads with keyword result_type, and axis does matter
1330
1332
@overload
1331
1333
def apply (
1332
1334
self ,
1333
- f : Callable [..., Series ],
1335
+ f : Callable [..., Series [ Any ] ],
1334
1336
axis : AxisIndex = ...,
1335
1337
raw : _bool = ...,
1336
- args = ...,
1338
+ args : Any = ...,
1337
1339
* ,
1338
1340
result_type : Literal ["reduce" ],
1339
- ** kwargs ,
1340
- ) -> Series : ...
1341
+ ** kwargs : Any ,
1342
+ ) -> Series [ Any ] : ...
1341
1343
1342
1344
# apply() overloads with default result_type of None, and keyword axis=1 matters
1343
1345
@overload
@@ -1346,45 +1348,45 @@ class DataFrame(NDFrame, OpsMixin):
1346
1348
f : Callable [..., S1 ],
1347
1349
raw : _bool = ...,
1348
1350
result_type : None = ...,
1349
- args = ...,
1351
+ args : Any = ...,
1350
1352
* ,
1351
1353
axis : AxisColumn ,
1352
- ** kwargs ,
1354
+ ** kwargs : Any ,
1353
1355
) -> Series [S1 ]: ...
1354
1356
@overload
1355
1357
def apply (
1356
1358
self ,
1357
- f : Callable [..., ListLikeExceptSeriesAndStr | Mapping ],
1359
+ f : Callable [..., ListLikeExceptSeriesAndStr | Mapping [ Any , Any ] ],
1358
1360
raw : _bool = ...,
1359
1361
result_type : None = ...,
1360
- args = ...,
1362
+ args : Any = ...,
1361
1363
* ,
1362
1364
axis : AxisColumn ,
1363
- ** kwargs ,
1364
- ) -> Series : ...
1365
+ ** kwargs : Any ,
1366
+ ) -> Series [ Any ] : ...
1365
1367
@overload
1366
1368
def apply (
1367
1369
self ,
1368
- f : Callable [..., Series ],
1370
+ f : Callable [..., Series [ Any ] ],
1369
1371
raw : _bool = ...,
1370
1372
result_type : None = ...,
1371
- args = ...,
1373
+ args : Any = ...,
1372
1374
* ,
1373
1375
axis : AxisColumn ,
1374
- ** kwargs ,
1376
+ ** kwargs : Any ,
1375
1377
) -> DataFrame : ...
1376
1378
1377
1379
# apply() overloads with keyword axis=1 and keyword result_type
1378
1380
@overload
1379
1381
def apply (
1380
1382
self ,
1381
- f : Callable [..., Series ],
1383
+ f : Callable [..., Series [ Any ] ],
1382
1384
raw : _bool = ...,
1383
- args = ...,
1385
+ args : Any = ...,
1384
1386
* ,
1385
1387
axis : AxisColumn ,
1386
1388
result_type : Literal ["reduce" ],
1387
- ** kwargs ,
1389
+ ** kwargs : Any ,
1388
1390
) -> DataFrame : ...
1389
1391
1390
1392
# Add spacing between apply() overloads and remaining annotations
0 commit comments