@@ -178,7 +178,7 @@ from pandas.plotting import PlotAccessor
178178from pandas .plotting ._core import _BoxPlotT
179179
180180_T_MUTABLE_MAPPING_co = TypeVar (
181- "_T_MUTABLE_MAPPING_co" , bound = MutableMapping , covariant = True
181+ "_T_MUTABLE_MAPPING_co" , bound = MutableMapping [ Any , Any ] , covariant = True
182182)
183183
184184class _iLocIndexerFrame (_iLocIndexer , Generic [_T ]):
@@ -484,7 +484,7 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
484484 self ,
485485 orient : str = ...,
486486 * ,
487- into : type [defaultdict ],
487+ into : type [defaultdict [ Any , Any ] ],
488488 index : Literal [True ] = True ,
489489 ) -> Never : ...
490490 @overload
@@ -500,7 +500,7 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
500500 self ,
501501 orient : Literal ["records" ],
502502 * ,
503- into : type [dict ] = ...,
503+ into : type [dict [ Any , Any ] ] = ...,
504504 index : Literal [True ] = True ,
505505 ) -> list [dict [Hashable , Any ]]: ...
506506 @overload
@@ -516,23 +516,23 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
516516 self ,
517517 orient : Literal ["index" ],
518518 * ,
519- into : OrderedDict | type [OrderedDict ],
519+ into : OrderedDict [ Any , Any ] | type [OrderedDict [ Any , Any ] ],
520520 index : Literal [True ] = True ,
521521 ) -> OrderedDict [Hashable , dict [Hashable , Any ]]: ...
522522 @overload
523523 def to_dict (
524524 self ,
525525 orient : Literal ["index" ],
526526 * ,
527- into : type [MutableMapping ],
527+ into : type [MutableMapping [ Any , Any ] ],
528528 index : Literal [True ] = True ,
529529 ) -> MutableMapping [Hashable , dict [Hashable , Any ]]: ...
530530 @overload
531531 def to_dict (
532532 self ,
533533 orient : Literal ["index" ],
534534 * ,
535- into : type [dict ] = ...,
535+ into : type [dict [ Any , Any ] ] = ...,
536536 index : Literal [True ] = True ,
537537 ) -> dict [Hashable , dict [Hashable , Any ]]: ...
538538 @overload
@@ -548,23 +548,23 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
548548 self ,
549549 orient : Literal ["dict" , "list" , "series" ] = ...,
550550 * ,
551- into : type [dict ] = ...,
551+ into : type [dict [ Any , Any ] ] = ...,
552552 index : Literal [True ] = True ,
553553 ) -> dict [Hashable , Any ]: ...
554554 @overload
555555 def to_dict (
556556 self ,
557557 orient : Literal ["split" , "tight" ],
558558 * ,
559- into : MutableMapping [Any , Any ] | type [MutableMapping ],
559+ into : MutableMapping [Any , Any ] | type [MutableMapping [ Any , Any ] ],
560560 index : bool = ...,
561561 ) -> MutableMapping [str , list [Any ]]: ...
562562 @overload
563563 def to_dict (
564564 self ,
565565 orient : Literal ["split" , "tight" ],
566566 * ,
567- into : type [dict ] = ...,
567+ into : type [dict [ Any , Any ] ] = ...,
568568 index : bool = ...,
569569 ) -> dict [str , list [Any ]]: ...
570570 @classmethod
@@ -1052,21 +1052,33 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
10521052 @overload
10531053 def replace (
10541054 self ,
1055- to_replace : ReplaceValue | Mapping [HashableT2 , ReplaceValue ] = ...,
1056- value : ReplaceValue | Mapping [HashableT3 , ReplaceValue ] = ...,
1055+ to_replace : (
1056+ ReplaceValue [Any , Any ] | Mapping [HashableT2 , ReplaceValue [Any , Any ]]
1057+ ) = ...,
1058+ value : (
1059+ ReplaceValue [Any , Any ] | Mapping [HashableT3 , ReplaceValue [Any , Any ]]
1060+ ) = ...,
10571061 * ,
10581062 inplace : Literal [True ],
1059- regex : ReplaceValue | Mapping [HashableT3 , ReplaceValue ] = ...,
1063+ regex : (
1064+ ReplaceValue [Any , Any ] | Mapping [HashableT3 , ReplaceValue [Any , Any ]]
1065+ ) = ...,
10601066 # TODO: pandas-dev/pandas#63195 return Self after Pandas 3.0
10611067 ) -> None : ...
10621068 @overload
10631069 def replace (
10641070 self ,
1065- to_replace : ReplaceValue | Mapping [HashableT2 , ReplaceValue ] = ...,
1066- value : ReplaceValue | Mapping [HashableT3 , ReplaceValue ] = ...,
1071+ to_replace : (
1072+ ReplaceValue [Any , Any ] | Mapping [HashableT2 , ReplaceValue [Any , Any ]]
1073+ ) = ...,
1074+ value : (
1075+ ReplaceValue [Any , Any ] | Mapping [HashableT3 , ReplaceValue [Any , Any ]]
1076+ ) = ...,
10671077 * ,
10681078 inplace : Literal [False ] = False ,
1069- regex : ReplaceValue | Mapping [HashableT3 , ReplaceValue ] = ...,
1079+ regex : (
1080+ ReplaceValue [Any , Any ] | Mapping [HashableT3 , ReplaceValue [Any , Any ]]
1081+ ) = ...,
10701082 ) -> Self : ...
10711083 def shift (
10721084 self ,
@@ -1381,7 +1393,7 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
13811393 dropna : _bool = ...,
13821394 ) -> DataFrameGroupBy [Period , Literal [False ]]: ...
13831395 @overload
1384- def groupby ( # pyright: ignore reportOverlappingOverload
1396+ def groupby (
13851397 self ,
13861398 by : IntervalIndex [IntervalT ],
13871399 level : IndexLabel | None = ...,
@@ -1394,7 +1406,7 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
13941406 @overload
13951407 def groupby (
13961408 self ,
1397- by : IntervalIndex [ IntervalT ] ,
1409+ by : IntervalIndex ,
13981410 level : IndexLabel | None = ...,
13991411 as_index : Literal [False ] = False ,
14001412 sort : _bool = ...,
@@ -1405,7 +1417,7 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
14051417 @overload
14061418 def groupby ( # type: ignore[overload-overlap] # pyright: ignore reportOverlappingOverload
14071419 self ,
1408- by : MultiIndex | GroupByObjectNonScalar | None = ...,
1420+ by : MultiIndex | GroupByObjectNonScalar [ Any ] | None = ...,
14091421 level : IndexLabel | None = ...,
14101422 as_index : Literal [True ] = True ,
14111423 sort : _bool = ...,
@@ -1416,7 +1428,7 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
14161428 @overload
14171429 def groupby ( # type: ignore[overload-overlap]
14181430 self ,
1419- by : MultiIndex | GroupByObjectNonScalar | None = ...,
1431+ by : MultiIndex | GroupByObjectNonScalar [ Any ] | None = ...,
14201432 level : IndexLabel | None = ...,
14211433 as_index : Literal [False ] = False ,
14221434 sort : _bool = ...,
@@ -1477,11 +1489,17 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
14771489 ) -> Self : ...
14781490 def pivot_table (
14791491 self ,
1480- values : _PivotTableValuesTypes = None ,
1481- index : _PivotTableIndexTypes = None ,
1482- columns : _PivotTableColumnsTypes = None ,
1492+ values : _PivotTableValuesTypes [
1493+ Any # ty: ignore[invalid-type-arguments]
1494+ ] = None ,
1495+ index : _PivotTableIndexTypes [Any ] = None , # ty: ignore[invalid-type-arguments]
1496+ columns : _PivotTableColumnsTypes [
1497+ Any # ty: ignore[invalid-type-arguments]
1498+ ] = None ,
14831499 aggfunc : (
1484- _PivotAggFunc | Sequence [_PivotAggFunc ] | Mapping [Hashable , _PivotAggFunc ]
1500+ _PivotAggFunc [Any ]
1501+ | Sequence [_PivotAggFunc [Any ]]
1502+ | Mapping [Hashable , _PivotAggFunc [Any ]]
14851503 ) = "mean" ,
14861504 fill_value : Scalar | None = None ,
14871505 margins : _bool = False ,
@@ -1876,7 +1894,7 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
18761894 @overload
18771895 def boxplot (
18781896 self ,
1879- by : Hashable | ListLikeHashable ,
1897+ by : Hashable | ListLikeHashable [ Any ] ,
18801898 ax : PlotAxes | None = None ,
18811899 fontsize : float | _str | None = None ,
18821900 rot : float = 0 ,
@@ -1891,7 +1909,7 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
18911909 @overload
18921910 def boxplot (
18931911 self ,
1894- by : Hashable | ListLikeHashable ,
1912+ by : Hashable | ListLikeHashable [ Any ] ,
18951913 ax : PlotAxes | None = None ,
18961914 fontsize : float | _str | None = None ,
18971915 rot : float = 0 ,
@@ -2634,7 +2652,7 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
26342652 ** kwargs : Any ,
26352653 ) -> Series : ...
26362654 # Not actually positional, but used to handle removal of deprecated
2637- def set_axis (self , labels : AxesData , * , axis : Axis = 0 ) -> Self : ...
2655+ def set_axis (self , labels : AxesData [ Any ] , * , axis : Axis = 0 ) -> Self : ...
26382656 def skew (
26392657 self ,
26402658 axis : Axis | None = ...,
@@ -2863,8 +2881,12 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
28632881 def __rfloordiv__ (
28642882 self , other : float | DataFrame | Series [int ] | Series [float ] | Sequence [float ]
28652883 ) -> Self : ...
2866- def __truediv__ (self , other : float | DataFrame | Series | Sequence ) -> Self : ...
2867- def __rtruediv__ (self , other : float | DataFrame | Series | Sequence ) -> Self : ...
2884+ def __truediv__ (
2885+ self , other : float | DataFrame | Series | Sequence [Any ]
2886+ ) -> Self : ...
2887+ def __rtruediv__ (
2888+ self , other : float | DataFrame | Series | Sequence [Any ]
2889+ ) -> Self : ...
28682890 @final
28692891 def __bool__ (self ) -> NoReturn : ...
28702892
0 commit comments