File tree 1 file changed +3
-1
lines changed
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -639,7 +639,7 @@ def _from_sequence(
639
639
dtype = StringDtype (storage = "python" )
640
640
641
641
from pandas .core .arrays .masked import BaseMaskedArray
642
-
642
+
643
643
na_value = dtype .na_value
644
644
if isinstance (scalars , BaseMaskedArray ):
645
645
# avoid costly conversion to object dtype
@@ -655,6 +655,8 @@ def _from_sequence(
655
655
# zero_copy_only to True which caused problems see GH#52076
656
656
scalars = np .array (scalars )
657
657
# convert non-na-likes to str, and nan-likes to StringDtype().na_value
658
+ if isinstance (scalars , list ) and all (isinstance (x ,list ) for x in scalars ):
659
+ scalars = [str (x ) for x in scalars ]
658
660
result = lib .ensure_string_array (scalars , na_value = na_value , copy = copy )
659
661
660
662
# Manually creating new array avoids the validation step in the __init__, so is
You can’t perform that action at this time.
0 commit comments