@@ -499,9 +499,7 @@ def dataclasses_to_dicts(data):
499
499
# Conversion of Inputs to Arrays
500
500
501
501
502
- def to_arrays (
503
- data , columns , coerce_float : bool = False , dtype : Optional [DtypeObj ] = None
504
- ):
502
+ def to_arrays (data , columns , dtype : Optional [DtypeObj ] = None ):
505
503
"""
506
504
Return list of arrays, columns.
507
505
"""
@@ -547,7 +545,7 @@ def to_arrays(
547
545
data = [tuple (x ) for x in data ]
548
546
content , columns = _list_to_arrays (data , columns )
549
547
550
- content , columns = _finalize_columns_and_data (content , columns , dtype , coerce_float )
548
+ content , columns = _finalize_columns_and_data (content , columns , dtype )
551
549
return content , columns
552
550
553
551
@@ -634,7 +632,6 @@ def _finalize_columns_and_data(
634
632
content : np .ndarray ,
635
633
columns : Optional [Union [Index , List ]],
636
634
dtype : Optional [DtypeObj ],
637
- coerce_float : bool ,
638
635
) -> Tuple [List [np .ndarray ], Union [Index , List [Axis ]]]:
639
636
"""
640
637
Ensure we have valid columns, cast object dtypes if possible.
@@ -648,7 +645,7 @@ def _finalize_columns_and_data(
648
645
raise ValueError (err ) from err
649
646
650
647
if len (content ) and content [0 ].dtype == np .object_ :
651
- content = _convert_object_array (content , dtype = dtype , coerce_float = coerce_float )
648
+ content = _convert_object_array (content , dtype = dtype )
652
649
return content , columns
653
650
654
651
@@ -711,15 +708,14 @@ def _validate_or_indexify_columns(
711
708
712
709
713
710
def _convert_object_array (
714
- content : List [Scalar ], coerce_float : bool = False , dtype : Optional [DtypeObj ] = None
711
+ content : List [Scalar ], dtype : Optional [DtypeObj ] = None
715
712
) -> List [Scalar ]:
716
713
"""
717
714
Internal function ot convert object array.
718
715
719
716
Parameters
720
717
----------
721
718
content: list of processed data records
722
- coerce_float: bool, to coerce floats or not, default is False
723
719
dtype: np.dtype, default is None
724
720
725
721
Returns
@@ -729,7 +725,7 @@ def _convert_object_array(
729
725
# provide soft conversion of object dtypes
730
726
def convert (arr ):
731
727
if dtype != np .dtype ("O" ):
732
- arr = lib .maybe_convert_objects (arr , try_float = coerce_float )
728
+ arr = lib .maybe_convert_objects (arr )
733
729
arr = maybe_cast_to_datetime (arr , dtype )
734
730
return arr
735
731
0 commit comments