File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -2773,17 +2773,18 @@ def maybe_convert_objects(ndarray[object] objects,
27732773 seen.object_ = True
27742774
27752775 elif seen.str_:
2776- if using_string_dtype() and is_string_array(objects, skipna = True ):
2776+ if convert_to_nullable_dtype and is_string_array(objects, skipna = True ):
27772777 from pandas.core.arrays.string_ import StringDtype
27782778
2779- dtype = StringDtype(na_value = np.nan )
2779+ dtype = StringDtype()
27802780 return dtype.construct_array_type()._from_sequence(objects, dtype = dtype)
27812781
2782- elif convert_to_nullable_dtype and is_string_array(objects, skipna = True ):
2782+ elif using_string_dtype() and is_string_array(objects, skipna = True ):
27832783 from pandas.core.arrays.string_ import StringDtype
27842784
2785- dtype = StringDtype()
2785+ dtype = StringDtype(na_value = np.nan )
27862786 return dtype.construct_array_type()._from_sequence(objects, dtype = dtype)
2787+
27872788 elif storage == " python" :
27882789 from pandas.core.arrays.string_ import StringDtype
27892790
You can’t perform that action at this time.
0 commit comments