@@ -4,7 +4,6 @@ from fractions import Fraction
4
4
from numbers import Number
5
5
6
6
import sys
7
- import warnings
8
7
9
8
import cython
10
9
from cython import Py_ssize_t
@@ -615,7 +614,7 @@ def clean_index_list(obj: list):
615
614
616
615
# don't force numpy coerce with nan's
617
616
inferred = infer_dtype(obj, skipna = False )
618
- if inferred in [' string' , ' bytes' , ' unicode ' , ' mixed' , ' mixed-integer' ]:
617
+ if inferred in [' string' , ' bytes' , ' mixed' , ' mixed-integer' ]:
619
618
return np.asarray(obj, dtype = object ), 0
620
619
elif inferred in [' integer' ]:
621
620
# TODO: we infer an integer but it *could* be a uint64
@@ -1094,15 +1093,15 @@ cdef _try_infer_map(v):
1094
1093
return None
1095
1094
1096
1095
1097
- def infer_dtype (value: object , skipna: object = None ) -> str:
1096
+ def infer_dtype (value: object , skipna: bool = True ) -> str:
1098
1097
"""
1099
1098
Efficiently infer the type of a passed val , or list-like
1100
1099
array of values. Return a string describing the type.
1101
1100
1102
1101
Parameters
1103
1102
----------
1104
1103
value : scalar , list , ndarray , or pandas type
1105
- skipna : bool , default False
1104
+ skipna : bool , default True
1106
1105
Ignore NaN values when inferring the type.
1107
1106
1108
1107
.. versionadded:: 0.21.0
@@ -1113,7 +1112,6 @@ def infer_dtype(value: object, skipna: object=None) -> str:
1113
1112
Results can include:
1114
1113
1115
1114
- string
1116
- - unicode
1117
1115
- bytes
1118
1116
- floating
1119
1117
- integer
@@ -1200,12 +1198,6 @@ def infer_dtype(value: object, skipna: object=None) -> str:
1200
1198
bint seen_pdnat = False
1201
1199
bint seen_val = False
1202
1200
1203
- if skipna is None:
1204
- msg = (' A future version of pandas will default to `skipna=True`. To '
1205
- ' silence this warning, pass `skipna=True|False` explicitly.' )
1206
- warnings.warn(msg , FutureWarning , stacklevel = 2 )
1207
- skipna = False
1208
-
1209
1201
if util.is_array(value ):
1210
1202
values = value
1211
1203
elif hasattr (value, ' dtype' ):
0 commit comments