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