Skip to content

Commit 8be0127

Browse files
committed
Changes according to comments
1 parent 9ef9f9e commit 8be0127

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

pandas/core/internals/blocks.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,7 @@ def coerce_to_target_dtype(self, other):
10051005
we can also safely try to coerce to the same dtype
10061006
and will receive the same block
10071007
"""
1008-
if type(other) == str:
1008+
if isinstance(other, str):
10091009
dtype = "string"
10101010
if is_dtype_equal(self.dtype, dtype):
10111011
return self

pandas/tests/series/methods/test_replace.py

+1
Original file line numberDiff line numberDiff line change
@@ -420,5 +420,6 @@ def test_replace_only_one_dictlike_arg(self):
420420
],
421421
)
422422
def test_replace_dtype(self, series, to_replace, expected):
423+
# GH 33484
423424
result = str(series.replace(to_replace).dtype)
424425
assert expected == result

0 commit comments

Comments
 (0)