@@ -476,7 +476,9 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
476
476
storage_options : StorageOptions = ...,
477
477
value_labels : dict [Hashable , dict [float , str ]] | None = ...,
478
478
) -> None : ...
479
- def to_feather (self , path : FilePath | WriteBuffer [bytes ], ** kwargs ) -> None : ...
479
+ def to_feather (
480
+ self , path : FilePath | WriteBuffer [bytes ], ** kwargs : Any
481
+ ) -> None : ...
480
482
@overload
481
483
def to_parquet (
482
484
self ,
@@ -669,14 +671,26 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
669
671
) -> None : ...
670
672
def __setitem__ (self , key , value ) -> None : ...
671
673
@overload
672
- def query (self , expr : _str , * , inplace : Literal [True ], ** kwargs ) -> None : ...
674
+ def query (
675
+ self ,
676
+ expr : _str ,
677
+ * ,
678
+ inplace : Literal [True ],
679
+ ** kwargs : Any , # TODO: make more precise https://github.com/pandas-dev/pandas-stubs/issues/1173
680
+ ) -> None : ...
673
681
@overload
674
- def query (self , expr : _str , * , inplace : Literal [False ] = ..., ** kwargs ) -> Self : ...
682
+ def query (
683
+ self ,
684
+ expr : _str ,
685
+ * ,
686
+ inplace : Literal [False ] = ...,
687
+ ** kwargs : Any , # TODO: make more precise https://github.com/pandas-dev/pandas-stubs/issues/1173
688
+ ) -> Self : ...
675
689
@overload
676
- def eval (self , expr : _str , * , inplace : Literal [True ], ** kwargs ) -> None : ...
690
+ def eval (self , expr : _str , * , inplace : Literal [True ], ** kwargs : Any ) -> None : ...
677
691
@overload
678
692
def eval (
679
- self , expr : _str , * , inplace : Literal [False ] = ..., ** kwargs
693
+ self , expr : _str , * , inplace : Literal [False ] = ..., ** kwargs : Any
680
694
) -> Scalar | np .ndarray | Self | Series : ...
681
695
AstypeArgExt : TypeAlias = (
682
696
AstypeArg
@@ -1277,32 +1291,38 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
1277
1291
def diff (self , periods : int = ..., axis : Axis = ...) -> Self : ...
1278
1292
@overload
1279
1293
def agg ( # pyright: ignore[reportOverlappingOverload]
1280
- self , func : AggFuncTypeBase | AggFuncTypeDictSeries , axis : Axis = ..., ** kwargs
1294
+ self ,
1295
+ func : AggFuncTypeBase | AggFuncTypeDictSeries ,
1296
+ axis : Axis = ...,
1297
+ ** kwargs : Any ,
1281
1298
) -> Series : ...
1282
1299
@overload
1283
1300
def agg (
1284
1301
self ,
1285
1302
func : list [AggFuncTypeBase ] | AggFuncTypeDictFrame = ...,
1286
1303
axis : Axis = ...,
1287
- ** kwargs ,
1304
+ ** kwargs : Any ,
1288
1305
) -> Self : ...
1289
1306
@overload
1290
1307
def aggregate ( # pyright: ignore[reportOverlappingOverload]
1291
- self , func : AggFuncTypeBase | AggFuncTypeDictSeries , axis : Axis = ..., ** kwargs
1308
+ self ,
1309
+ func : AggFuncTypeBase | AggFuncTypeDictSeries ,
1310
+ axis : Axis = ...,
1311
+ ** kwargs : Any ,
1292
1312
) -> Series : ...
1293
1313
@overload
1294
1314
def aggregate (
1295
1315
self ,
1296
1316
func : list [AggFuncTypeBase ] | AggFuncTypeDictFrame ,
1297
1317
axis : Axis = ...,
1298
- ** kwargs ,
1318
+ ** kwargs : Any ,
1299
1319
) -> Self : ...
1300
1320
def transform (
1301
1321
self ,
1302
1322
func : AggFuncTypeFrame ,
1303
1323
axis : Axis = ...,
1304
- * args ,
1305
- ** kwargs ,
1324
+ * args : Any ,
1325
+ ** kwargs : Any ,
1306
1326
) -> Self : ...
1307
1327
1308
1328
# apply() overloads with default result_type of None, and is indifferent to axis
@@ -1450,7 +1470,7 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
1450
1470
1451
1471
# Add spacing between apply() overloads and remaining annotations
1452
1472
def map (
1453
- self , func : Callable , na_action : Literal ["ignore" ] | None = ..., ** kwargs
1473
+ self , func : Callable , na_action : Literal ["ignore" ] | None = ..., ** kwargs : Any
1454
1474
) -> Self : ...
1455
1475
def join (
1456
1476
self ,
@@ -1477,7 +1497,9 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
1477
1497
indicator : _bool | _str = ...,
1478
1498
validate : _str | None = ...,
1479
1499
) -> Self : ...
1480
- def round (self , decimals : int | dict | Series = ..., * args , ** kwargs ) -> Self : ...
1500
+ def round (
1501
+ self , decimals : int | dict | Series = ..., * args : Any , ** kwargs : Any
1502
+ ) -> Self : ...
1481
1503
def corr (
1482
1504
self ,
1483
1505
method : Literal ["pearson" , "kendall" , "spearman" ] = ...,
@@ -1510,24 +1532,11 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
1510
1532
def idxmin (
1511
1533
self , axis : Axis = ..., skipna : _bool = ..., numeric_only : _bool = ...
1512
1534
) -> Series : ...
1513
- @overload
1514
1535
def mode (
1515
1536
self ,
1516
1537
axis : Axis = ...,
1517
- skipna : _bool = ...,
1518
1538
numeric_only : _bool = ...,
1519
- * ,
1520
- level : Level ,
1521
- ** kwargs ,
1522
- ) -> Self : ...
1523
- @overload
1524
- def mode (
1525
- self ,
1526
- axis : Axis = ...,
1527
- skipna : _bool = ...,
1528
- level : None = ...,
1529
- numeric_only : _bool = ...,
1530
- ** kwargs ,
1539
+ dropna : _bool = ...,
1531
1540
) -> Series : ...
1532
1541
@overload
1533
1542
def quantile (
@@ -1576,7 +1585,7 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
1576
1585
layout : tuple [int , int ] | None = ...,
1577
1586
bins : int | list = ...,
1578
1587
backend : _str | None = ...,
1579
- ** kwargs ,
1588
+ ** kwargs : Any ,
1580
1589
): ...
1581
1590
def boxplot (
1582
1591
self ,
@@ -1590,7 +1599,7 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
1590
1599
layout : tuple [int , int ] | None = ...,
1591
1600
return_type : Literal ["axes" , "dict" , "both" ] | None = ...,
1592
1601
backend : _str | None = ...,
1593
- ** kwargs ,
1602
+ ** kwargs : Any ,
1594
1603
): ...
1595
1604
sparse = ...
1596
1605
@@ -1649,15 +1658,15 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
1649
1658
axis : None ,
1650
1659
bool_only : _bool | None = ...,
1651
1660
skipna : _bool = ...,
1652
- ** kwargs ,
1661
+ ** kwargs : Any ,
1653
1662
) -> _bool : ...
1654
1663
@overload
1655
1664
def all (
1656
1665
self ,
1657
1666
axis : Axis = ...,
1658
1667
bool_only : _bool | None = ...,
1659
1668
skipna : _bool = ...,
1660
- ** kwargs ,
1669
+ ** kwargs : Any ,
1661
1670
) -> Series [_bool ]: ...
1662
1671
@overload
1663
1672
def any (
@@ -1666,7 +1675,7 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
1666
1675
axis : None ,
1667
1676
bool_only : _bool | None = ...,
1668
1677
skipna : _bool = ...,
1669
- ** kwargs ,
1678
+ ** kwargs : Any ,
1670
1679
) -> _bool : ...
1671
1680
@overload
1672
1681
def any (
@@ -1675,7 +1684,7 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
1675
1684
axis : Axis = ...,
1676
1685
bool_only : _bool | None = ...,
1677
1686
skipna : _bool = ...,
1678
- ** kwargs ,
1687
+ ** kwargs : Any ,
1679
1688
) -> Series [_bool ]: ...
1680
1689
def asof (self , where , subset : _str | list [_str ] | None = ...) -> Self : ...
1681
1690
def asfreq (
@@ -1730,7 +1739,7 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
1730
1739
* ,
1731
1740
axis : Axis | None = ...,
1732
1741
inplace : Literal [True ],
1733
- ** kwargs ,
1742
+ ** kwargs : Any ,
1734
1743
) -> None : ...
1735
1744
@overload
1736
1745
def clip (
@@ -1740,20 +1749,20 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
1740
1749
* ,
1741
1750
axis : Axis | None = ...,
1742
1751
inplace : Literal [False ] = ...,
1743
- ** kwargs ,
1752
+ ** kwargs : Any ,
1744
1753
) -> Self : ...
1745
1754
def copy (self , deep : _bool = ...) -> Self : ...
1746
1755
def cummax (
1747
- self , axis : Axis | None = ..., skipna : _bool = ..., * args , ** kwargs
1756
+ self , axis : Axis | None = ..., skipna : _bool = ..., * args : Any , ** kwargs : Any
1748
1757
) -> Self : ...
1749
1758
def cummin (
1750
- self , axis : Axis | None = ..., skipna : _bool = ..., * args , ** kwargs
1759
+ self , axis : Axis | None = ..., skipna : _bool = ..., * args : Any , ** kwargs : Any
1751
1760
) -> Self : ...
1752
1761
def cumprod (
1753
- self , axis : Axis | None = ..., skipna : _bool = ..., * args , ** kwargs
1762
+ self , axis : Axis | None = ..., skipna : _bool = ..., * args : Any , ** kwargs : Any
1754
1763
) -> Self : ...
1755
1764
def cumsum (
1756
- self , axis : Axis | None = ..., skipna : _bool = ..., * args , ** kwargs
1765
+ self , axis : Axis | None = ..., skipna : _bool = ..., * args : Any , ** kwargs : Any
1757
1766
) -> Self : ...
1758
1767
def describe (
1759
1768
self ,
@@ -1854,7 +1863,7 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
1854
1863
limit_direction : Literal ["forward" , "backward" , "both" ] = ...,
1855
1864
limit_area : Literal ["inside" , "outside" ] | None = ...,
1856
1865
inplace : Literal [True ],
1857
- ** kwargs ,
1866
+ ** kwargs : Any ,
1858
1867
) -> None : ...
1859
1868
@overload
1860
1869
def interpolate (
@@ -1866,7 +1875,7 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
1866
1875
limit_direction : Literal ["forward" , "backward" , "both" ] = ...,
1867
1876
limit_area : Literal ["inside" , "outside" ] | None = ...,
1868
1877
inplace : Literal [False ] = ...,
1869
- ** kwargs ,
1878
+ ** kwargs : Any ,
1870
1879
) -> Self : ...
1871
1880
def keys (self ) -> Index : ...
1872
1881
def kurt (
@@ -1875,15 +1884,15 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
1875
1884
skipna : _bool | None = ...,
1876
1885
level : None = ...,
1877
1886
numeric_only : _bool = ...,
1878
- ** kwargs ,
1887
+ ** kwargs : Any ,
1879
1888
) -> Series : ...
1880
1889
def kurtosis (
1881
1890
self ,
1882
1891
axis : Axis | None = ...,
1883
1892
skipna : _bool | None = ...,
1884
1893
level : None = ...,
1885
1894
numeric_only : _bool = ...,
1886
- ** kwargs ,
1895
+ ** kwargs : Any ,
1887
1896
) -> Series : ...
1888
1897
def last (self , offset ) -> Self : ...
1889
1898
def last_valid_index (self ) -> Scalar : ...
@@ -1927,31 +1936,31 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
1927
1936
skipna : _bool | None = ...,
1928
1937
level : None = ...,
1929
1938
numeric_only : _bool = ...,
1930
- ** kwargs ,
1939
+ ** kwargs : Any ,
1931
1940
) -> Series : ...
1932
1941
def mean (
1933
1942
self ,
1934
1943
axis : Axis | None = ...,
1935
1944
skipna : _bool | None = ...,
1936
1945
level : None = ...,
1937
1946
numeric_only : _bool = ...,
1938
- ** kwargs ,
1947
+ ** kwargs : Any ,
1939
1948
) -> Series : ...
1940
1949
def median (
1941
1950
self ,
1942
1951
axis : Axis | None = ...,
1943
1952
skipna : _bool | None = ...,
1944
1953
level : None = ...,
1945
1954
numeric_only : _bool = ...,
1946
- ** kwargs ,
1955
+ ** kwargs : Any ,
1947
1956
) -> Series : ...
1948
1957
def min (
1949
1958
self ,
1950
1959
axis : Axis | None = ...,
1951
1960
skipna : _bool | None = ...,
1952
1961
level : None = ...,
1953
1962
numeric_only : _bool = ...,
1954
- ** kwargs ,
1963
+ ** kwargs : Any ,
1955
1964
) -> Series : ...
1956
1965
def mod (
1957
1966
self ,
@@ -1981,7 +1990,7 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
1981
1990
fill_method : None = ...,
1982
1991
limit : int | None = ...,
1983
1992
freq = ...,
1984
- ** kwargs ,
1993
+ ** kwargs : Any , # TODO: make more precise https://github.com/pandas-dev/pandas-stubs/issues/1169
1985
1994
) -> Self : ...
1986
1995
def pop (self , item : _str ) -> Series : ...
1987
1996
def pow (
@@ -1998,7 +2007,7 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
1998
2007
level : None = ...,
1999
2008
numeric_only : _bool = ...,
2000
2009
min_count : int = ...,
2001
- ** kwargs ,
2010
+ ** kwargs : Any ,
2002
2011
) -> Series : ...
2003
2012
def product (
2004
2013
self ,
@@ -2007,7 +2016,7 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
2007
2016
level : None = ...,
2008
2017
numeric_only : _bool = ...,
2009
2018
min_count : int = ...,
2010
- ** kwargs ,
2019
+ ** kwargs : Any ,
2011
2020
) -> Series : ...
2012
2021
def radd (
2013
2022
self ,
@@ -2168,7 +2177,7 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
2168
2177
level : None = ...,
2169
2178
ddof : int = ...,
2170
2179
numeric_only : _bool = ...,
2171
- ** kwargs ,
2180
+ ** kwargs : Any ,
2172
2181
) -> Series : ...
2173
2182
# Not actually positional, but used to handle removal of deprecated
2174
2183
def set_axis (self , labels , * , axis : Axis , copy : _bool = ...) -> Self : ...
@@ -2178,7 +2187,7 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
2178
2187
skipna : _bool | None = ...,
2179
2188
level : None = ...,
2180
2189
numeric_only : _bool = ...,
2181
- ** kwargs ,
2190
+ ** kwargs : Any ,
2182
2191
) -> Series : ...
2183
2192
def squeeze (self , axis : Axis | None = ...): ...
2184
2193
def std (
@@ -2188,7 +2197,7 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
2188
2197
level : None = ...,
2189
2198
ddof : int = ...,
2190
2199
numeric_only : _bool = ...,
2191
- ** kwargs ,
2200
+ ** kwargs : Any ,
2192
2201
) -> Series : ...
2193
2202
def sub (
2194
2203
self ,
@@ -2211,13 +2220,16 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
2211
2220
level : None = ...,
2212
2221
numeric_only : _bool = ...,
2213
2222
min_count : int = ...,
2214
- ** kwargs ,
2223
+ ** kwargs : Any ,
2215
2224
) -> Series : ...
2216
2225
def swapaxes (self , axis1 : Axis , axis2 : Axis , copy : _bool = ...) -> Self : ...
2217
2226
def tail (self , n : int = ...) -> Self : ...
2218
- def take (self , indices : list , axis : Axis = ..., ** kwargs ) -> Self : ...
2227
+ def take (self , indices : list , axis : Axis = ..., ** kwargs : Any ) -> Self : ...
2219
2228
def to_clipboard (
2220
- self , excel : _bool = ..., sep : _str | None = ..., ** kwargs
2229
+ self ,
2230
+ excel : _bool = ...,
2231
+ sep : _str | None = ...,
2232
+ ** kwargs : Any , # TODO: make more precise https://github.com/pandas-dev/pandas-stubs/issues/1174
2221
2233
) -> None : ...
2222
2234
@overload
2223
2235
def to_json (
@@ -2377,7 +2389,7 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
2377
2389
level : None = ...,
2378
2390
ddof : int = ...,
2379
2391
numeric_only : _bool = ...,
2380
- ** kwargs ,
2392
+ ** kwargs : Any ,
2381
2393
) -> Series : ...
2382
2394
@overload
2383
2395
def where (
0 commit comments