Skip to content

Commit a4c409e

Browse files
committed
Ensure comparison with string
1 parent 910e29f commit a4c409e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/dtypes/cast.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1029,7 +1029,7 @@ def convert_dtypes(
10291029
elif (
10301030
infer_objects
10311031
and is_object_dtype(input_array.dtype)
1032-
and inferred_dtype == "integer"
1032+
and (isinstance(inferred_dtype, str) and inferred_dtype == "integer")
10331033
):
10341034
inferred_dtype = target_int_dtype
10351035

0 commit comments

Comments
 (0)