Skip to content

Commit ddd7e3b

Browse files
authored
Ensure comparison with string
1 parent 33bd950 commit ddd7e3b

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
@@ -1086,7 +1086,7 @@ def convert_dtypes(
10861086
elif (
10871087
infer_objects
10881088
and input_array.dtype == object
1089-
and inferred_dtype == "floating"
1089+
and (isinstance(inferred_dtype, str) and inferred_dtype == "floating")
10901090
):
10911091
inferred_dtype = pandas_dtype_func("Float64")
10921092

0 commit comments

Comments
 (0)