@@ -1250,7 +1250,7 @@ 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 = ...,
@@ -1272,7 +1272,7 @@ class DataFrame(NDFrame, OpsMixin):
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 = ...,
@@ -1295,7 +1295,7 @@ class DataFrame(NDFrame, OpsMixin):
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
1301
args = ...,
@@ -1317,7 +1317,9 @@ class DataFrame(NDFrame, OpsMixin):
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
1325
args = ...,
@@ -1330,14 +1332,14 @@ class DataFrame(NDFrame, OpsMixin):
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
1338
args = ...,
1337
1339
* ,
1338
1340
result_type : Literal ["reduce" ],
1339
1341
** kwargs ,
1340
- ) -> Series : ...
1342
+ ) -> Series [ Any ] : ...
1341
1343
1342
1344
# apply() overloads with default result_type of None, and keyword axis=1 matters
1343
1345
@overload
@@ -1365,7 +1367,7 @@ class DataFrame(NDFrame, OpsMixin):
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
1373
args = ...,
@@ -1378,7 +1380,7 @@ class DataFrame(NDFrame, OpsMixin):
1378
1380
@overload
1379
1381
def apply (
1380
1382
self ,
1381
- f : Callable [..., Series ],
1383
+ f : Callable [..., Series [ Any ] ],
1382
1384
raw : _bool = ...,
1383
1385
args = ...,
1384
1386
* ,
0 commit comments