@@ -69,6 +69,7 @@ from pandas._typing import (
6969 T_COMPLEX ,
7070 AnyAll ,
7171 AnyArrayLike ,
72+ AnyArrayLikeInt ,
7273 ArrayLike ,
7374 AxesData ,
7475 CategoryDtypeArg ,
@@ -406,7 +407,7 @@ class Index(IndexOpsMixin[S1], ElementOpsMixin[S1]):
406407 notnull = ...
407408 def fillna (self , value = ...): ...
408409 def dropna (self , how : AnyAll = "any" ) -> Self : ...
409- def unique (self , level = ... ) -> Self : ...
410+ def unique (self , level : Hashable | None = None ) -> Self : ...
410411 def drop_duplicates (self , * , keep : DropKeep = ...) -> Self : ...
411412 def duplicated (self , keep : DropKeep = "first" ) -> np_1darray [np .bool ]: ...
412413 def __and__ (self , other : Never ) -> Never : ...
@@ -442,12 +443,12 @@ class Index(IndexOpsMixin[S1], ElementOpsMixin[S1]):
442443 ) -> np_1darray [np .intp ]: ...
443444 def reindex (
444445 self ,
445- target ,
446- method : ReindexMethod | None = ... ,
447- level = ... ,
448- limit = ... ,
449- tolerance = ... ,
450- ): ...
446+ target : Iterable [ Any ] ,
447+ method : ReindexMethod | None = None ,
448+ level : int | None = None ,
449+ limit : int | None = None ,
450+ tolerance : Scalar | AnyArrayLike | Sequence [ Scalar ] | None = None ,
451+ ) -> tuple [ Index , np_1darray [ np . intp ] | None ] : ...
451452 @overload
452453 def join (
453454 self ,
@@ -483,7 +484,7 @@ class Index(IndexOpsMixin[S1], ElementOpsMixin[S1]):
483484 cond : Sequence [bool ] | np_ndarray_bool | BooleanArray | IndexOpsMixin [bool ],
484485 other : Scalar | AnyArrayLike | None = None ,
485486 ) -> Index : ...
486- def __contains__ (self , key ) -> bool : ...
487+ def __contains__ (self , key : Hashable ) -> bool : ...
487488 @final
488489 def __setitem__ (self , key , value ) -> None : ...
489490 @overload
@@ -500,7 +501,7 @@ class Index(IndexOpsMixin[S1], ElementOpsMixin[S1]):
500501 @overload
501502 def append (self , other : Index | Sequence [Index ]) -> Index : ...
502503 def putmask (self , mask , value ): ...
503- def equals (self , other ) -> bool : ...
504+ def equals (self , other : object ) -> bool : ...
504505 @final
505506 def identical (self , other ) -> bool : ...
506507 @final
@@ -534,8 +535,13 @@ class Index(IndexOpsMixin[S1], ElementOpsMixin[S1]):
534535 def slice_locs (
535536 self , start : SliceType = None , end : SliceType = None , step : int | None = None
536537 ): ...
537- def delete (self , loc ) -> Self : ...
538- def insert (self , loc , item ) -> Self : ...
538+ def delete (
539+ self , loc : np .integer | int | AnyArrayLikeInt | Sequence [int ]
540+ ) -> Self : ...
541+ @overload
542+ def insert (self , loc : int , item : S1 ) -> Self : ...
543+ @overload
544+ def insert (self , loc : int , item : object ) -> Index : ...
539545 def drop (self , labels , errors : IgnoreRaise = "raise" ) -> Self : ...
540546 @property
541547 def shape (self ) -> tuple [int , ...]: ...
0 commit comments