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