@@ -206,7 +206,6 @@ class DataFrame(NDFrame, OpsMixin):
206
206
@property
207
207
def style (self ) -> Styler : ...
208
208
def items (self ) -> Iterable [tuple [Hashable , Series ]]: ...
209
- def iteritems (self ) -> Iterable [tuple [Label , Series ]]: ...
210
209
def iterrows (self ) -> Iterable [tuple [Label , Series ]]: ...
211
210
def itertuples (self , index : _bool = ..., name : _str | None = ...): ...
212
211
def __len__ (self ) -> int : ...
@@ -292,6 +291,7 @@ class DataFrame(NDFrame, OpsMixin):
292
291
def to_stata (
293
292
self ,
294
293
path : FilePath | WriteBuffer [bytes ],
294
+ * ,
295
295
convert_dates : dict [HashableT , StataDateFormat ] | None = ...,
296
296
write_index : _bool = ...,
297
297
byteorder : Literal ["<" , ">" , "little" , "big" ] | None = ...,
@@ -302,7 +302,6 @@ class DataFrame(NDFrame, OpsMixin):
302
302
convert_strl : list [HashableT ] | None = ...,
303
303
compression : CompressionOptions = ...,
304
304
storage_options : StorageOptions = ...,
305
- * ,
306
305
value_labels : dict [Hashable , dict [float , str ]] | None = ...,
307
306
) -> None : ...
308
307
def to_feather (self , path : FilePath | WriteBuffer [bytes ], ** kwargs ) -> None : ...
@@ -1018,6 +1017,7 @@ class DataFrame(NDFrame, OpsMixin):
1018
1017
) -> _DataFrameGroupByNonScalar : ...
1019
1018
def pivot (
1020
1019
self ,
1020
+ * ,
1021
1021
index : IndexLabel = ...,
1022
1022
columns : IndexLabel = ...,
1023
1023
values : IndexLabel = ...,
@@ -1124,14 +1124,18 @@ class DataFrame(NDFrame, OpsMixin):
1124
1124
self ,
1125
1125
method : Literal ["pearson" , "kendall" , "spearman" ] = ...,
1126
1126
min_periods : int = ...,
1127
+ numeric_only : _bool = ...,
1128
+ ) -> DataFrame : ...
1129
+ def cov (
1130
+ self , min_periods : int | None = ..., ddof : int = ..., numeric_only : _bool = ...
1127
1131
) -> DataFrame : ...
1128
- def cov (self , min_periods : int | None = ..., ddof : int = ...) -> DataFrame : ...
1129
1132
def corrwith (
1130
1133
self ,
1131
1134
other : DataFrame | Series ,
1132
1135
axis : AxisType | None = ...,
1133
1136
drop : _bool = ...,
1134
1137
method : Literal ["pearson" , "kendall" , "spearman" ] = ...,
1138
+ numeric_only : _bool = ...,
1135
1139
) -> Series : ...
1136
1140
@overload
1137
1141
def count (
@@ -1142,8 +1146,12 @@ class DataFrame(NDFrame, OpsMixin):
1142
1146
self , axis : AxisType = ..., level : None = ..., numeric_only : _bool = ...
1143
1147
) -> Series : ...
1144
1148
def nunique (self , axis : AxisType = ..., dropna : bool = ...) -> Series : ...
1145
- def idxmax (self , axis : AxisType = ..., skipna : _bool = ...) -> Series : ...
1146
- def idxmin (self , axis : AxisType = ..., skipna : _bool = ...) -> Series : ...
1149
+ def idxmax (
1150
+ self , axis : AxisType = ..., skipna : _bool = ..., numeric_only : _bool = ...
1151
+ ) -> Series : ...
1152
+ def idxmin (
1153
+ self , axis : AxisType = ..., skipna : _bool = ..., numeric_only : _bool = ...
1154
+ ) -> Series : ...
1147
1155
@overload
1148
1156
def mode (
1149
1157
self ,
@@ -1296,6 +1304,7 @@ class DataFrame(NDFrame, OpsMixin):
1296
1304
@overload
1297
1305
def any (
1298
1306
self ,
1307
+ * ,
1299
1308
axis : None ,
1300
1309
bool_only : _bool | None = ...,
1301
1310
skipna : _bool = ...,
@@ -1304,6 +1313,7 @@ class DataFrame(NDFrame, OpsMixin):
1304
1313
@overload
1305
1314
def any (
1306
1315
self ,
1316
+ * ,
1307
1317
axis : AxisType = ...,
1308
1318
bool_only : _bool | None = ...,
1309
1319
skipna : _bool = ...,
@@ -1521,15 +1531,15 @@ class DataFrame(NDFrame, OpsMixin):
1521
1531
axis : AxisType | None = ...,
1522
1532
skipna : _bool | None = ...,
1523
1533
level : None = ...,
1524
- numeric_only : _bool | None = ...,
1534
+ numeric_only : _bool = ...,
1525
1535
** kwargs ,
1526
1536
) -> Series : ...
1527
1537
def kurtosis (
1528
1538
self ,
1529
1539
axis : AxisType | None = ...,
1530
1540
skipna : _bool | None = ...,
1531
1541
level : None = ...,
1532
- numeric_only : _bool | None = ...,
1542
+ numeric_only : _bool = ...,
1533
1543
** kwargs ,
1534
1544
) -> Series : ...
1535
1545
def last (self , offset ) -> DataFrame : ...
@@ -1540,62 +1550,46 @@ class DataFrame(NDFrame, OpsMixin):
1540
1550
def lt (
1541
1551
self , other , axis : AxisType = ..., level : Level | None = ...
1542
1552
) -> DataFrame : ...
1543
- @overload
1544
- def mad (
1545
- self ,
1546
- axis : AxisType | None = ...,
1547
- skipna : _bool | None = ...,
1548
- level : None = ...,
1549
- ) -> Series : ...
1550
- @overload
1551
- def mad (
1552
- self ,
1553
- axis : AxisType | None = ...,
1554
- skipna : _bool | None = ...,
1555
- * ,
1556
- level : Level ,
1557
- ** kwargs ,
1558
- ) -> DataFrame : ...
1559
1553
def mask (
1560
1554
self ,
1561
1555
cond : Series | DataFrame | np .ndarray ,
1562
1556
other = ...,
1563
1557
inplace : _bool = ...,
1564
1558
axis : AxisType | None = ...,
1565
1559
level : Level | None = ...,
1566
- errors : _str = ...,
1560
+ * , # Not actually positional-only, but needed due to depr in 1.5.0
1567
1561
try_cast : _bool = ...,
1568
1562
) -> DataFrame : ...
1569
1563
def max (
1570
1564
self ,
1571
1565
axis : AxisType | None = ...,
1572
1566
skipna : _bool | None = ...,
1573
1567
level : None = ...,
1574
- numeric_only : _bool | None = ...,
1568
+ numeric_only : _bool = ...,
1575
1569
** kwargs ,
1576
1570
) -> Series : ...
1577
1571
def mean (
1578
1572
self ,
1579
1573
axis : AxisType | None = ...,
1580
1574
skipna : _bool | None = ...,
1581
1575
level : None = ...,
1582
- numeric_only : _bool | None = ...,
1576
+ numeric_only : _bool = ...,
1583
1577
** kwargs ,
1584
1578
) -> Series : ...
1585
1579
def median (
1586
1580
self ,
1587
1581
axis : AxisType | None = ...,
1588
1582
skipna : _bool | None = ...,
1589
1583
level : None = ...,
1590
- numeric_only : _bool | None = ...,
1584
+ numeric_only : _bool = ...,
1591
1585
** kwargs ,
1592
1586
) -> Series : ...
1593
1587
def min (
1594
1588
self ,
1595
1589
axis : AxisType | None = ...,
1596
1590
skipna : _bool | None = ...,
1597
1591
level : None = ...,
1598
- numeric_only : _bool | None = ...,
1592
+ numeric_only : _bool = ...,
1599
1593
** kwargs ,
1600
1594
) -> Series : ...
1601
1595
def mod (
@@ -1649,7 +1643,7 @@ class DataFrame(NDFrame, OpsMixin):
1649
1643
axis : AxisType | None = ...,
1650
1644
skipna : _bool | None = ...,
1651
1645
level : None = ...,
1652
- numeric_only : _bool | None = ...,
1646
+ numeric_only : _bool = ...,
1653
1647
min_count : int = ...,
1654
1648
** kwargs ,
1655
1649
) -> Series : ...
@@ -1658,7 +1652,7 @@ class DataFrame(NDFrame, OpsMixin):
1658
1652
axis : AxisType | None = ...,
1659
1653
skipna : _bool = ...,
1660
1654
level : None = ...,
1661
- numeric_only : _bool | None = ...,
1655
+ numeric_only : _bool = ...,
1662
1656
min_count : int = ...,
1663
1657
** kwargs ,
1664
1658
) -> Series : ...
@@ -1828,32 +1822,17 @@ class DataFrame(NDFrame, OpsMixin):
1828
1822
skipna : _bool | None = ...,
1829
1823
level : None = ...,
1830
1824
ddof : int = ...,
1831
- numeric_only : _bool | None = ...,
1825
+ numeric_only : _bool = ...,
1832
1826
** kwargs ,
1833
1827
) -> Series : ...
1834
- @overload
1835
- def set_axis (
1836
- self , labels , inplace : Literal [True ], axis : AxisType = ...
1837
- ) -> None : ...
1838
- @overload
1839
- def set_axis (
1840
- self , labels , inplace : Literal [False ], axis : AxisType = ...
1841
- ) -> DataFrame : ...
1842
- @overload
1843
- def set_axis (self , labels , * , axis : AxisType = ...) -> DataFrame : ...
1844
- @overload
1845
- def set_axis (
1846
- self ,
1847
- labels ,
1848
- axis : AxisType = ...,
1849
- inplace : _bool | None = ...,
1850
- ) -> DataFrame | None : ...
1828
+ # Not actually positional, but used to handle removal of deprecated
1829
+ def set_axis (self , labels , * , axis : AxisType , copy : _bool = ...) -> DataFrame : ...
1851
1830
def skew (
1852
1831
self ,
1853
1832
axis : AxisType | None = ...,
1854
1833
skipna : _bool | None = ...,
1855
1834
level : None = ...,
1856
- numeric_only : _bool | None = ...,
1835
+ numeric_only : _bool = ...,
1857
1836
** kwargs ,
1858
1837
) -> Series : ...
1859
1838
def slice_shift (self , periods : int = ..., axis : AxisType = ...) -> DataFrame : ...
@@ -1886,7 +1865,7 @@ class DataFrame(NDFrame, OpsMixin):
1886
1865
axis : AxisType | None = ...,
1887
1866
skipna : _bool | None = ...,
1888
1867
level : None = ...,
1889
- numeric_only : _bool | None = ...,
1868
+ numeric_only : _bool = ...,
1890
1869
min_count : int = ...,
1891
1870
** kwargs ,
1892
1871
) -> Series : ...
@@ -2022,7 +2001,7 @@ class DataFrame(NDFrame, OpsMixin):
2022
2001
skipna : _bool | None = ...,
2023
2002
level : None = ...,
2024
2003
ddof : int = ...,
2025
- numeric_only : _bool | None = ...,
2004
+ numeric_only : _bool = ...,
2026
2005
** kwargs ,
2027
2006
) -> Series : ...
2028
2007
def where (
@@ -2036,7 +2015,7 @@ class DataFrame(NDFrame, OpsMixin):
2036
2015
inplace : _bool = ...,
2037
2016
axis : AxisType | None = ...,
2038
2017
level : Level | None = ...,
2039
- errors : _str = ...,
2018
+ * , # Not actually positional-only, but needed due to depr in 1.5.0
2040
2019
try_cast : _bool = ...,
2041
2020
) -> DataFrame : ...
2042
2021
# Move from generic because Series is Generic and it returns Series[bool] there
0 commit comments