We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8be0127 commit 078aca1Copy full SHA for 078aca1
pandas/core/internals/blocks.py
@@ -45,6 +45,7 @@
45
is_re,
46
is_re_compilable,
47
is_sparse,
48
+ is_string_dtype,
49
is_timedelta64_dtype,
50
pandas_dtype,
51
)
@@ -1006,8 +1007,7 @@ def coerce_to_target_dtype(self, other):
1006
1007
and will receive the same block
1008
"""
1009
if isinstance(other, str):
- dtype = "string"
1010
- if is_dtype_equal(self.dtype, dtype):
+ if is_string_dtype(self.dtype):
1011
return self
1012
else:
1013
dtype = np.object_
0 commit comments