File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -2699,16 +2699,16 @@ def maybe_convert_objects(ndarray[object] objects,
2699
2699
seen.object_ = True
2700
2700
2701
2701
elif seen.str_:
2702
- if using_string_dtype() and is_string_array(objects, skipna = True ):
2702
+ if convert_to_nullable_dtype and is_string_array(objects, skipna = True ):
2703
2703
from pandas.core.arrays.string_ import StringDtype
2704
2704
2705
- dtype = StringDtype(na_value = np.nan )
2705
+ dtype = StringDtype()
2706
2706
return dtype.construct_array_type()._from_sequence(objects, dtype = dtype)
2707
2707
2708
- elif convert_to_nullable_dtype and is_string_array(objects, skipna = True ):
2708
+ elif using_string_dtype() and is_string_array(objects, skipna = True ):
2709
2709
from pandas.core.arrays.string_ import StringDtype
2710
2710
2711
- dtype = StringDtype()
2711
+ dtype = StringDtype(na_value = np.nan )
2712
2712
return dtype.construct_array_type()._from_sequence(objects, dtype = dtype)
2713
2713
2714
2714
seen.object_ = True
You can’t perform that action at this time.
0 commit comments