@@ -4,7 +4,6 @@ from fractions import Fraction
44from numbers import Number
55
66import sys
7- import warnings
87
98import cython
109from cython import Py_ssize_t
@@ -615,7 +614,7 @@ def clean_index_list(obj: list):
615614
616615 # don't force numpy coerce with nan's
617616 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' ]:
619618 return np.asarray(obj, dtype = object ), 0
620619 elif inferred in [' integer' ]:
621620 # TODO: we infer an integer but it *could* be a uint64
@@ -1094,15 +1093,15 @@ cdef _try_infer_map(v):
10941093 return None
10951094
10961095
1097- def infer_dtype (value: object , skipna: object = None ) -> str:
1096+ def infer_dtype (value: object , skipna: bool = True ) -> str:
10981097 """
10991098 Efficiently infer the type of a passed val , or list-like
11001099 array of values. Return a string describing the type.
11011100
11021101 Parameters
11031102 ----------
11041103 value : scalar , list , ndarray , or pandas type
1105- skipna : bool , default False
1104+ skipna : bool , default True
11061105 Ignore NaN values when inferring the type.
11071106
11081107 .. versionadded:: 0.21.0
@@ -1113,7 +1112,6 @@ def infer_dtype(value: object, skipna: object=None) -> str:
11131112 Results can include:
11141113
11151114 - string
1116- - unicode
11171115 - bytes
11181116 - floating
11191117 - integer
@@ -1200,12 +1198,6 @@ def infer_dtype(value: object, skipna: object=None) -> str:
12001198 bint seen_pdnat = False
12011199 bint seen_val = False
12021200
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-
12091201 if util.is_array(value ):
12101202 values = value
12111203 elif hasattr (value, ' dtype' ):
0 commit comments