@@ -69,6 +69,7 @@ from pandas._typing import (
6969 T_COMPLEX ,
7070 AnyAll ,
7171 AnyArrayLike ,
72+ AnyArrayLikeInt ,
7273 ArrayLike ,
7374 AxesData ,
7475 CategoryDtypeArg ,
@@ -408,7 +409,7 @@ class Index(IndexOpsMixin[S1], ElementOpsMixin[S1]):
408409 notnull = ...
409410 def fillna (self , value = ...): ...
410411 def dropna (self , how : AnyAll = "any" ) -> Self : ...
411- def unique (self , level = ... ) -> Self : ...
412+ def unique (self , level : Hashable | None = None ) -> Self : ...
412413 def drop_duplicates (self , * , keep : DropKeep = ...) -> Self : ...
413414 def duplicated (self , keep : DropKeep = "first" ) -> np_1darray [np .bool ]: ...
414415 def __and__ (self , other : Never ) -> Never : ...
@@ -444,12 +445,12 @@ class Index(IndexOpsMixin[S1], ElementOpsMixin[S1]):
444445 ) -> np_1darray [np .intp ]: ...
445446 def reindex (
446447 self ,
447- target ,
448- method : ReindexMethod | None = ... ,
449- level = ... ,
450- limit = ... ,
451- tolerance = ... ,
452- ): ...
448+ target : Iterable [ Any ] ,
449+ method : ReindexMethod | None = None ,
450+ level : int | None = None ,
451+ limit : int | None = None ,
452+ tolerance : Scalar | AnyArrayLike | Sequence [ Scalar ] | None = None ,
453+ ) -> tuple [ Index , np_1darray [ np . intp ] | None ] : ...
453454 @overload
454455 def join (
455456 self ,
@@ -485,7 +486,7 @@ class Index(IndexOpsMixin[S1], ElementOpsMixin[S1]):
485486 cond : Sequence [bool ] | np_ndarray_bool | BooleanArray | IndexOpsMixin [bool ],
486487 other : Scalar | AnyArrayLike | None = None ,
487488 ) -> Index : ...
488- def __contains__ (self , key ) -> bool : ...
489+ def __contains__ (self , key : Hashable ) -> bool : ...
489490 @final
490491 def __setitem__ (self , key , value ) -> None : ...
491492 @overload
@@ -502,7 +503,7 @@ class Index(IndexOpsMixin[S1], ElementOpsMixin[S1]):
502503 @overload
503504 def append (self , other : Index | Sequence [Index ]) -> Index : ...
504505 def putmask (self , mask , value ): ...
505- def equals (self , other ) -> bool : ...
506+ def equals (self , other : object ) -> bool : ...
506507 @final
507508 def identical (self , other ) -> bool : ...
508509 @final
@@ -536,8 +537,13 @@ class Index(IndexOpsMixin[S1], ElementOpsMixin[S1]):
536537 def slice_locs (
537538 self , start : SliceType = None , end : SliceType = None , step : int | None = None
538539 ): ...
539- def delete (self , loc ) -> Self : ...
540- def insert (self , loc , item ) -> Self : ...
540+ def delete (
541+ self , loc : np .integer | int | AnyArrayLikeInt | Sequence [int ]
542+ ) -> Self : ...
543+ @overload
544+ def insert (self , loc : int , item : S1 ) -> Self : ...
545+ @overload
546+ def insert (self , loc : int , item : object ) -> Index : ...
541547 def drop (self , labels , errors : IgnoreRaise = "raise" ) -> Self : ...
542548 @property
543549 def shape (self ) -> tuple [int , ...]: ...
0 commit comments