Skip to content

Commit 79ad94f

Browse files
committed
Remove hard-code
1 parent 8be0127 commit 79ad94f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pandas/core/internals/blocks.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1006,8 +1006,7 @@ def coerce_to_target_dtype(self, other):
10061006
and will receive the same block
10071007
"""
10081008
if isinstance(other, str):
1009-
dtype = "string"
1010-
if is_dtype_equal(self.dtype, dtype):
1009+
if infer_dtype_from(self.dtype, pandas_dtype=True):
10111010
return self
10121011
else:
10131012
dtype = np.object_

0 commit comments

Comments
 (0)