@@ -429,8 +429,7 @@ def _get_axes(N, K, index, columns):
429
429
# Conversion of Inputs to Arrays
430
430
431
431
432
- def to_arrays (data , columns , coerce_float = False , dtype = None ,
433
- to_integer_array = False ):
432
+ def to_arrays (data , columns , coerce_float = False , dtype = None , to_integer_array = False ):
434
433
"""
435
434
Return list of arrays, columns.
436
435
"""
@@ -457,8 +456,11 @@ def to_arrays(data, columns, coerce_float=False, dtype=None,
457
456
return _list_to_arrays (data , columns , coerce_float = coerce_float , dtype = dtype )
458
457
elif isinstance (data [0 ], abc .Mapping ):
459
458
return _list_of_dict_to_arrays (
460
- data , columns , coerce_float = coerce_float , dtype = dtype ,
461
- to_integer_array = to_integer_array
459
+ data ,
460
+ columns ,
461
+ coerce_float = coerce_float ,
462
+ dtype = dtype ,
463
+ to_integer_array = to_integer_array ,
462
464
)
463
465
elif isinstance (data [0 ], ABCSeries ):
464
466
return _list_of_series_to_arrays (
@@ -530,6 +532,7 @@ def _list_of_series_to_arrays(data, columns, coerce_float=False, dtype=None):
530
532
531
533
532
534
def _list_of_dict_to_arrays (data , columns , coerce_float = False , dtype = None ):
535
+
533
536
"""Convert list of dicts to numpy arrays
534
537
535
538
if `columns` is not passed, column names are inferred from the records
@@ -563,13 +566,17 @@ def _list_of_dict_to_arrays(data, columns, coerce_float=False, dtype=None):
563
566
564
567
content = list (lib .dicts_to_array (data , list (columns )).T )
565
568
return _convert_object_array (
566
- content , columns , dtype = dtype , coerce_float = coerce_float ,
567
- to_integer_array = to_integer_array
569
+ content ,
570
+ columns ,
571
+ dtype = dtype ,
572
+ coerce_float = coerce_float ,
573
+ to_integer_array = to_integer_array ,
568
574
)
569
575
570
576
571
- def _convert_object_array (content , columns , coerce_float = False , dtype = None ,
572
- to_integer_array = False ):
577
+ def _convert_object_array (
578
+ content , columns , coerce_float = False , dtype = None , to_integer_array = False
579
+ ):
573
580
if columns is None :
574
581
columns = ibase .default_index (len (content ))
575
582
else :
@@ -583,8 +590,9 @@ def _convert_object_array(content, columns, coerce_float=False, dtype=None,
583
590
# provide soft conversion of object dtypes
584
591
def convert (arr ):
585
592
if dtype != object and dtype != np .object :
586
- arr = lib .maybe_convert_objects (arr , try_float = coerce_float ,
587
- to_integer_array = to_integer_array )
593
+ arr = lib .maybe_convert_objects (
594
+ arr , try_float = coerce_float , to_integer_array = to_integer_array
595
+ )
588
596
arr = maybe_cast_to_datetime (arr , dtype )
589
597
return arr
590
598
0 commit comments