File tree 1 file changed +5
-6
lines changed
1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -2681,14 +2681,13 @@ def maybe_convert_objects(ndarray[object] objects,
2681
2681
seen.object_ = True
2682
2682
2683
2683
elif seen.str_:
2684
- if is_string_array(objects, skipna = True ):
2685
- if using_pyarrow_string_dtype():
2686
- import pyarrow as pa
2684
+ if using_pyarrow_string_dtype() and is_string_array(objects, skipna = True ):
2685
+ import pyarrow as pa
2687
2686
2688
- from pandas.core.dtypes.dtypes import ArrowDtype
2687
+ from pandas.core.dtypes.dtypes import ArrowDtype
2689
2688
2690
- dtype = ArrowDtype(pa.string())
2691
- return dtype.construct_array_type()._from_sequence(objects, dtype = dtype)
2689
+ dtype = ArrowDtype(pa.string())
2690
+ return dtype.construct_array_type()._from_sequence(objects, dtype = dtype)
2692
2691
2693
2692
seen.object_ = True
2694
2693
elif seen.interval_:
You can’t perform that action at this time.
0 commit comments