Skip to content

Commit 09c7168

Browse files
committed
Add doc-string for maybe_convert_objects
1 parent c03312c commit 09c7168

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

pandas/_libs/lib.pyx

+26
Original file line numberDiff line numberDiff line change
@@ -1961,7 +1961,33 @@ def maybe_convert_objects(ndarray[object] objects, bint try_float=0,
19611961
bint convert_to_nullable_integer=0):
19621962
"""
19631963
Type inference function-- convert object array to proper dtype
1964+
1965+
Parameters
1966+
----------
1967+
values : ndarray
1968+
Array of object elements to convert.
1969+
try_float : bool, default False
1970+
If an array-like object contains only float or NaN values is
1971+
encountered, whether to convert and return an array of float dtype.
1972+
safe : bool, default False
1973+
Whether to upcast numeric type (e.g. int cast to float). If set to
1974+
True, no upcasting will be performed.
1975+
convert_datetime : bool, default False
1976+
If an array-like object contains only datetime values or NaT is
1977+
encountered, whether to convert and return an array of M8[ns] dtype.
1978+
convert_timedelta : bool, default False
1979+
If an array-like object contains only timedelta values or NaT is
1980+
encountered, whether to convert and return an array of m8[ns] dtype.
1981+
convert_to_nullable_integer : bool, default False
1982+
If an array-like object contains only interger values (and NaN) is
1983+
encountered, whether to convert and return an IntegerArray.
1984+
1985+
Returns
1986+
-------
1987+
array : array of converted object values to more specific dtypes if
1988+
pplicable
19641989
"""
1990+
19651991
cdef:
19661992
Py_ssize_t i, n
19671993
ndarray[float64_t] floats

0 commit comments

Comments
 (0)