Skip to content

Commit 9dcc82d

Browse files
committed
#validate set item
1 parent bcc7436 commit 9dcc82d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/arrays/numpy_.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,6 @@ def _validate_setitem_value(self, value):
589589

590590
# Note: without the "str" here, the f-string rendering raises in
591591
# py38 builds.
592-
if isinstance(value, str):
592+
if lib.infer_dtype(value)!=self.dtype:
593593
raise TypeError(f"Invalid value '{str(value)}' for dtype {self.dtype}")
594594

0 commit comments

Comments
 (0)