@@ -369,7 +369,6 @@ def _from_sequence_of_strings(
369
369
scalars = strings .cast (pa .int64 ())
370
370
except pa .ArrowInvalid :
371
371
pass
372
-
373
372
elif pa .types .is_time (pa_type ):
374
373
from pandas .core .tools .times import to_time
375
374
@@ -397,18 +396,10 @@ def _from_sequence_of_strings(
397
396
from pandas .core .tools .numeric import to_numeric
398
397
399
398
scalars = to_numeric (strings , errors = "raise" )
400
- if not pa .types .is_decimal (pa_type ) and isinstance (
401
- strings , (pa .Array , pa .ChunkedArray )
402
- ):
403
- # TODO: figure out why doing this cast breaks with decimal dtype
404
- # in test_from_sequence_of_strings_pa_array
405
- mask = strings .is_null ()
406
- scalars = pa .array (scalars , mask = np .array (mask ), type = pa_type )
407
- # TODO: could we just do strings.cast(pa_type)?
408
- elif isinstance (strings , (pa .Array , pa .ChunkedArray )):
399
+ if isinstance (strings , (pa .Array , pa .ChunkedArray )):
409
400
scalars = strings .cast (pa_type )
410
401
elif mask is not None :
411
- scalars = pa .array (scalars , mask = mask . view ( bool ) , type = pa_type )
402
+ scalars = pa .array (scalars , mask = mask , type = pa_type )
412
403
413
404
else :
414
405
raise NotImplementedError (
0 commit comments