@@ -2545,7 +2545,6 @@ def maybe_convert_objects(ndarray[object] objects,
25452545 bint convert_numeric = True , # NB: different default!
25462546 bint convert_to_nullable_dtype = False ,
25472547 bint convert_non_numeric = False ,
2548- object dtype_if_all_na = None ,
25492548 object dtype_if_all_nat = None ) -> "ArrayLike":
25502549 """
25512550 Type inference function-- convert object array to proper dtype
@@ -2567,8 +2566,6 @@ def maybe_convert_objects(ndarray[object] objects,
25672566 encountered , whether to convert and return an Boolean/IntegerArray.
25682567 convert_non_numeric : bool , default False
25692568 Whether to convert datetime , timedelta , period , interval types.
2570- dtype_if_all_na : np.dtype , ExtensionDtype , or None , default None
2571- Dtype to cast to if we have all-NA or all-None.
25722569 dtype_if_all_nat : np.dtype , ExtensionDtype , or None , default None
25732570 Dtype to cast to if we have all-NaT.
25742571
@@ -2841,16 +2838,6 @@ def maybe_convert_objects(ndarray[object] objects,
28412838 else :
28422839 seen.object_ = True
28432840
2844- elif seen.null_:
2845- if not seen.object_ and not seen.numeric_ and not seen.bool_:
2846- # all NaT, None, or nan (at least one NA or None)
2847- dtype = dtype_if_all_na
2848- if dtype is not None :
2849- cls = dtype.construct_array_type()
2850- obj = cls ._from_sequence([], dtype = dtype)
2851- taker = - np.ones((< object > objects).shape, dtype = np.intp)
2852- return obj.take(taker, allow_fill = True )
2853-
28542841 if not convert_numeric:
28552842 # Note: we count "bool" as numeric here. This is because
28562843 # np.array(list_of_items) will convert bools just like it will numeric
0 commit comments