Skip to content

Commit c61aecd

Browse files
jbrockmendelphofl
authored andcommitted
update caught exception (pandas-dev#45747)
1 parent bafe4ee commit c61aecd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/internals/blocks.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,7 @@ def setitem(self, indexer, value):
926926
value = extract_array(value, extract_numpy=True)
927927
try:
928928
casted = np_can_hold_element(values.dtype, value)
929-
except ValueError:
929+
except LossySetitemError:
930930
# current dtype cannot store value, coerce to common dtype
931931
nb = self.coerce_to_target_dtype(value)
932932
return nb.setitem(indexer, value)

0 commit comments

Comments
 (0)