@@ -39,10 +39,7 @@ from pandas.core.arraylike import OpsMixin
3939from pandas .core .generic import NDFrame
4040from pandas .core .groupby .generic import DataFrameGroupBy
4141from pandas .core .indexers import BaseIndexer
42- from pandas .core .indexes .base import (
43- Index ,
44- UnknownIndex ,
45- )
42+ from pandas .core .indexes .base import Index
4643from pandas .core .indexes .category import CategoricalIndex
4744from pandas .core .indexes .datetimes import DatetimeIndex
4845from pandas .core .indexes .interval import IntervalIndex
@@ -1761,9 +1758,7 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
17611758 @property
17621759 def iloc (self ) -> _iLocIndexerFrame [Self ]: ...
17631760 @property
1764- # mypy complains if we use Index[Any] instead of UnknownIndex here, even though
1765- # the latter is aliased to the former ¯\_(ツ)_/¯.
1766- def index (self ) -> UnknownIndex : ...
1761+ def index (self ) -> Index : ...
17671762 @index .setter
17681763 def index (self , idx : Index ) -> None : ...
17691764 @property
@@ -1777,13 +1772,38 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
17771772 # methods
17781773 @final
17791774 def abs (self ) -> Self : ...
1775+ def __add__ (self , other : Any ) -> Self : ...
17801776 def add (
17811777 self ,
17821778 other : num | ListLike | DataFrame ,
17831779 axis : Axis | None = "columns" ,
17841780 level : Level | None = None ,
17851781 fill_value : float | None = None ,
17861782 ) -> Self : ...
1783+ def __radd__ (self , other : Any ) -> Self : ...
1784+ def radd (
1785+ self ,
1786+ other ,
1787+ axis : Axis = "columns" ,
1788+ level : Level | None = None ,
1789+ fill_value : float | None = None ,
1790+ ) -> Self : ...
1791+ def __sub__ (self , other : Any ) -> Self : ...
1792+ def sub (
1793+ self ,
1794+ other : num | ListLike | DataFrame ,
1795+ axis : Axis | None = ...,
1796+ level : Level | None = ...,
1797+ fill_value : float | None = None ,
1798+ ) -> Self : ...
1799+ def __rsub__ (self , other : Any ) -> Self : ...
1800+ def rsub (
1801+ self ,
1802+ other ,
1803+ axis : Axis = ...,
1804+ level : Level | None = ...,
1805+ fill_value : float | None = None ,
1806+ ) -> Self : ...
17871807 @final
17881808 def add_prefix (self , prefix : _str , axis : Axis | None = None ) -> Self : ...
17891809 @final
@@ -2227,13 +2247,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
22272247 min_count : int = 0 ,
22282248 ** kwargs : Any ,
22292249 ) -> Series : ...
2230- def radd (
2231- self ,
2232- other ,
2233- axis : Axis = "columns" ,
2234- level : Level | None = None ,
2235- fill_value : float | None = None ,
2236- ) -> Self : ...
22372250 @final
22382251 def rank (
22392252 self ,
@@ -2356,13 +2369,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
23562369 level : Level | None = ...,
23572370 fill_value : float | None = None ,
23582371 ) -> Self : ...
2359- def rsub (
2360- self ,
2361- other ,
2362- axis : Axis = ...,
2363- level : Level | None = ...,
2364- fill_value : float | None = None ,
2365- ) -> Self : ...
23662372 def rtruediv (
23672373 self ,
23682374 other ,
@@ -2408,20 +2414,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
24082414 numeric_only : _bool = False ,
24092415 ** kwargs : Any ,
24102416 ) -> Series : ...
2411- def sub (
2412- self ,
2413- other : num | ListLike | DataFrame ,
2414- axis : Axis | None = ...,
2415- level : Level | None = ...,
2416- fill_value : float | None = None ,
2417- ) -> Self : ...
2418- def subtract (
2419- self ,
2420- other : num | ListLike | DataFrame ,
2421- axis : Axis | None = ...,
2422- level : Level | None = ...,
2423- fill_value : float | None = None ,
2424- ) -> Self : ...
24252417 def sum (
24262418 self ,
24272419 axis : Axis = 0 ,
0 commit comments