File tree 1 file changed +7
-6
lines changed
1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -3924,14 +3924,15 @@ def _set_value(
3924
3924
# setitem will do validation that may raise TypeError,
3925
3925
# ValueError, or LossySetitemError
3926
3926
if takeable :
3927
- # error: Argument 2 to "column_setitem" of "BlockManager" has
3928
- # incompatible type "Union[Hashable, Sequence[Hashable]]";
3929
- # expected "Union[int, slice, ndarray[Any, Any]]"
3930
- self ._mgr .column_setitem (col , index , value ) # type: ignore[arg-type]
3927
+ icol = col
3928
+ iindex = index
3931
3929
else :
3932
3930
icol = self .columns .get_loc (col )
3933
- index = self .index .get_loc (index )
3934
- self ._mgr .column_setitem (icol , index , value ) # type: ignore[arg-type]
3931
+ iindex = self .index .get_loc (index )
3932
+ # error: Argument 2 to "column_setitem" of "BlockManager" has
3933
+ # incompatible type "Union[Hashable, Sequence[Hashable]]";
3934
+ # expected "Union[int, slice, ndarray[Any, Any]]"
3935
+ self ._mgr .column_setitem (icol , iindex , value ) # type: ignore[arg-type]
3935
3936
self ._clear_item_cache ()
3936
3937
3937
3938
except (KeyError , TypeError , ValueError , LossySetitemError ):
You can’t perform that action at this time.
0 commit comments