@@ -890,7 +890,7 @@ def style(self) -> "Styler":
890
890
"""
891
891
892
892
@Appender (_shared_docs ["items" ])
893
- def items (self ) -> Iterable [Tuple [Optional [ Hashable ] , Series ]]:
893
+ def items (self ) -> Iterable [Tuple [Label , Series ]]:
894
894
if self .columns .is_unique and hasattr (self , "_item_cache" ):
895
895
for k in self .columns :
896
896
yield k , self ._get_item_cache (k )
@@ -899,10 +899,10 @@ def items(self) -> Iterable[Tuple[Optional[Hashable], Series]]:
899
899
yield k , self ._ixs (i , axis = 1 )
900
900
901
901
@Appender (_shared_docs ["items" ])
902
- def iteritems (self ) -> Iterable [Tuple [Optional [ Hashable ] , Series ]]:
902
+ def iteritems (self ) -> Iterable [Tuple [Label , Series ]]:
903
903
yield from self .items ()
904
904
905
- def iterrows (self ) -> Iterable [Tuple [Optional [ Hashable ] , Series ]]:
905
+ def iterrows (self ) -> Iterable [Tuple [Label , Series ]]:
906
906
"""
907
907
Iterate over DataFrame rows as (index, Series) pairs.
908
908
@@ -4043,7 +4043,7 @@ def set_index(
4043
4043
"one-dimensional arrays."
4044
4044
)
4045
4045
4046
- missing : List [Optional [ Hashable ] ] = []
4046
+ missing : List [Label ] = []
4047
4047
for col in keys :
4048
4048
if isinstance (
4049
4049
col , (ABCIndexClass , ABCSeries , np .ndarray , list , abc .Iterator )
@@ -4082,7 +4082,7 @@ def set_index(
4082
4082
else :
4083
4083
arrays .append (self .index )
4084
4084
4085
- to_remove : List [Optional [ Hashable ] ] = []
4085
+ to_remove : List [Label ] = []
4086
4086
for col in keys :
4087
4087
if isinstance (col , ABCMultiIndex ):
4088
4088
for n in range (col .nlevels ):
@@ -4137,7 +4137,7 @@ def reset_index(
4137
4137
drop : bool = False ,
4138
4138
inplace : bool = False ,
4139
4139
col_level : Hashable = 0 ,
4140
- col_fill : Optional [ Hashable ] = "" ,
4140
+ col_fill : Label = "" ,
4141
4141
) -> Optional ["DataFrame" ]:
4142
4142
"""
4143
4143
Reset the index, or a level of it.
0 commit comments