@@ -22,10 +22,7 @@ from pandas import (
2222)
2323from pandas .core .arraylike import OpsMixin
2424from pandas .core .generic import NDFrame
25- from pandas .core .groupby .generic import (
26- _DataFrameGroupByNonScalar ,
27- _DataFrameGroupByScalar ,
28- )
25+ from pandas .core .groupby .generic import DataFrameGroupBy
2926from pandas .core .groupby .grouper import Grouper
3027from pandas .core .indexes .base import Index
3128from pandas .core .indexing import (
@@ -294,6 +291,7 @@ class DataFrame(NDFrame, OpsMixin):
294291 def to_stata (
295292 self ,
296293 path : FilePath | WriteBuffer [bytes ],
294+ * ,
297295 convert_dates : dict [HashableT , StataDateFormat ] | None = ...,
298296 write_index : _bool = ...,
299297 byteorder : Literal ["<" , ">" , "little" , "big" ] | None = ...,
@@ -304,7 +302,6 @@ class DataFrame(NDFrame, OpsMixin):
304302 convert_strl : list [HashableT ] | None = ...,
305303 compression : CompressionOptions = ...,
306304 storage_options : StorageOptions = ...,
307- * ,
308305 value_labels : dict [Hashable , dict [float , str ]] | None = ...,
309306 ) -> None : ...
310307 def to_feather (self , path : FilePath | WriteBuffer [bytes ], ** kwargs ) -> None : ...
@@ -992,20 +989,6 @@ class DataFrame(NDFrame, OpsMixin):
992989 filter_func : Callable | None = ...,
993990 errors : IgnoreRaise = ...,
994991 ) -> None : ...
995- @overload
996- def groupby (
997- self ,
998- by : Scalar ,
999- axis : AxisType = ...,
1000- level : Level | None = ...,
1001- as_index : _bool = ...,
1002- sort : _bool = ...,
1003- group_keys : _bool = ...,
1004- squeeze : _bool = ...,
1005- observed : _bool = ...,
1006- dropna : _bool = ...,
1007- ) -> _DataFrameGroupByScalar : ...
1008- @overload
1009992 def groupby (
1010993 self ,
1011994 by : GroupByObjectNonScalar | None = ...,
@@ -1017,9 +1000,10 @@ class DataFrame(NDFrame, OpsMixin):
10171000 squeeze : _bool = ...,
10181001 observed : _bool = ...,
10191002 dropna : _bool = ...,
1020- ) -> _DataFrameGroupByNonScalar : ...
1003+ ) -> DataFrameGroupBy : ...
10211004 def pivot (
10221005 self ,
1006+ * ,
10231007 index : IndexLabel = ...,
10241008 columns : IndexLabel = ...,
10251009 values : IndexLabel = ...,
@@ -1170,13 +1154,15 @@ class DataFrame(NDFrame, OpsMixin):
11701154 self ,
11711155 q : float = ...,
11721156 axis : AxisType = ...,
1157+ numeric_only : _bool = ...,
11731158 interpolation : QuantileInterpolation = ...,
11741159 ) -> Series : ...
11751160 @overload
11761161 def quantile (
11771162 self ,
11781163 q : list [float ] | np .ndarray ,
11791164 axis : AxisType = ...,
1165+ numeric_only : _bool = ...,
11801166 interpolation : QuantileInterpolation = ...,
11811167 ) -> DataFrame : ...
11821168 def to_timestamp (
@@ -1296,6 +1282,7 @@ class DataFrame(NDFrame, OpsMixin):
12961282 @overload
12971283 def any (
12981284 self ,
1285+ * ,
12991286 axis : None ,
13001287 bool_only : _bool | None = ...,
13011288 skipna : _bool = ...,
@@ -1304,6 +1291,7 @@ class DataFrame(NDFrame, OpsMixin):
13041291 @overload
13051292 def any (
13061293 self ,
1294+ * ,
13071295 axis : AxisType = ...,
13081296 bool_only : _bool | None = ...,
13091297 skipna : _bool = ...,
@@ -1521,13 +1509,15 @@ class DataFrame(NDFrame, OpsMixin):
15211509 axis : AxisType | None = ...,
15221510 skipna : _bool | None = ...,
15231511 level : None = ...,
1512+ numeric_only : _bool = ...,
15241513 ** kwargs ,
15251514 ) -> Series : ...
15261515 def kurtosis (
15271516 self ,
15281517 axis : AxisType | None = ...,
15291518 skipna : _bool | None = ...,
15301519 level : None = ...,
1520+ numeric_only : _bool = ...,
15311521 ** kwargs ,
15321522 ) -> Series : ...
15331523 def last (self , offset ) -> DataFrame : ...
@@ -1538,58 +1528,46 @@ class DataFrame(NDFrame, OpsMixin):
15381528 def lt (
15391529 self , other , axis : AxisType = ..., level : Level | None = ...
15401530 ) -> DataFrame : ...
1541- @overload
1542- def mad (
1543- self ,
1544- axis : AxisType | None = ...,
1545- skipna : _bool | None = ...,
1546- level : None = ...,
1547- ) -> Series : ...
1548- @overload
1549- def mad (
1550- self ,
1551- axis : AxisType | None = ...,
1552- skipna : _bool | None = ...,
1553- * ,
1554- level : Level ,
1555- ** kwargs ,
1556- ) -> DataFrame : ...
15571531 def mask (
15581532 self ,
15591533 cond : Series | DataFrame | np .ndarray ,
15601534 other = ...,
15611535 inplace : _bool = ...,
15621536 axis : AxisType | None = ...,
15631537 level : Level | None = ...,
1564- errors : _str = ...,
1538+ * , # Not actually positional-only, but needed due to depr in 1.5.0
15651539 try_cast : _bool = ...,
15661540 ) -> DataFrame : ...
15671541 def max (
15681542 self ,
15691543 axis : AxisType | None = ...,
15701544 skipna : _bool | None = ...,
15711545 level : None = ...,
1546+ numeric_only : _bool = ...,
15721547 ** kwargs ,
15731548 ) -> Series : ...
15741549 def mean (
15751550 self ,
15761551 axis : AxisType | None = ...,
15771552 skipna : _bool | None = ...,
15781553 level : None = ...,
1554+ numeric_only : _bool = ...,
15791555 ** kwargs ,
15801556 ) -> Series : ...
15811557 def median (
15821558 self ,
15831559 axis : AxisType | None = ...,
15841560 skipna : _bool | None = ...,
15851561 level : None = ...,
1562+ numeric_only : _bool = ...,
15861563 ** kwargs ,
15871564 ) -> Series : ...
15881565 def min (
15891566 self ,
15901567 axis : AxisType | None = ...,
15911568 skipna : _bool | None = ...,
15921569 level : None = ...,
1570+ numeric_only : _bool = ...,
15931571 ** kwargs ,
15941572 ) -> Series : ...
15951573 def mod (
@@ -1643,6 +1621,7 @@ class DataFrame(NDFrame, OpsMixin):
16431621 axis : AxisType | None = ...,
16441622 skipna : _bool | None = ...,
16451623 level : None = ...,
1624+ numeric_only : _bool = ...,
16461625 min_count : int = ...,
16471626 ** kwargs ,
16481627 ) -> Series : ...
@@ -1651,6 +1630,7 @@ class DataFrame(NDFrame, OpsMixin):
16511630 axis : AxisType | None = ...,
16521631 skipna : _bool = ...,
16531632 level : None = ...,
1633+ numeric_only : _bool = ...,
16541634 min_count : int = ...,
16551635 ** kwargs ,
16561636 ) -> Series : ...
@@ -1820,30 +1800,17 @@ class DataFrame(NDFrame, OpsMixin):
18201800 skipna : _bool | None = ...,
18211801 level : None = ...,
18221802 ddof : int = ...,
1803+ numeric_only : _bool = ...,
18231804 ** kwargs ,
18241805 ) -> Series : ...
1825- @overload
1826- def set_axis (
1827- self , labels , inplace : Literal [True ], axis : AxisType = ...
1828- ) -> None : ...
1829- @overload
1830- def set_axis (
1831- self , labels , inplace : Literal [False ], axis : AxisType = ...
1832- ) -> DataFrame : ...
1833- @overload
1834- def set_axis (self , labels , * , axis : AxisType = ...) -> DataFrame : ...
1835- @overload
1836- def set_axis (
1837- self ,
1838- labels ,
1839- axis : AxisType = ...,
1840- inplace : _bool | None = ...,
1841- ) -> DataFrame | None : ...
1806+ # Not actually positional, but used to handle removal of deprecated
1807+ def set_axis (self , labels , * , axis : AxisType , copy : bool = ...) -> DataFrame : ...
18421808 def skew (
18431809 self ,
18441810 axis : AxisType | None = ...,
18451811 skipna : _bool | None = ...,
18461812 level : None = ...,
1813+ numeric_only : _bool = ...,
18471814 ** kwargs ,
18481815 ) -> Series : ...
18491816 def slice_shift (self , periods : int = ..., axis : AxisType = ...) -> DataFrame : ...
@@ -1854,6 +1821,7 @@ class DataFrame(NDFrame, OpsMixin):
18541821 skipna : _bool = ...,
18551822 level : None = ...,
18561823 ddof : int = ...,
1824+ numeric_only : _bool = ...,
18571825 ** kwargs ,
18581826 ) -> Series : ...
18591827 def sub (
@@ -1875,6 +1843,7 @@ class DataFrame(NDFrame, OpsMixin):
18751843 axis : AxisType | None = ...,
18761844 skipna : _bool | None = ...,
18771845 level : None = ...,
1846+ numeric_only : _bool = ...,
18781847 min_count : int = ...,
18791848 ** kwargs ,
18801849 ) -> Series : ...
@@ -2010,6 +1979,7 @@ class DataFrame(NDFrame, OpsMixin):
20101979 skipna : _bool | None = ...,
20111980 level : None = ...,
20121981 ddof : int = ...,
1982+ numeric_only : _bool = ...,
20131983 ** kwargs ,
20141984 ) -> Series : ...
20151985 def where (
@@ -2023,7 +1993,7 @@ class DataFrame(NDFrame, OpsMixin):
20231993 inplace : _bool = ...,
20241994 axis : AxisType | None = ...,
20251995 level : Level | None = ...,
2026- errors : _str = ...,
1996+ * , # Not actually positional-only, but needed due to depr in 1.5.0
20271997 try_cast : _bool = ...,
20281998 ) -> DataFrame : ...
20291999 # Move from generic because Series is Generic and it returns Series[bool] there
0 commit comments