pandas.Series.convert_objects

Series.convert_objects(self, convert_dates=True, convert_numeric=False, convert_timedeltas=True, copy=True)[source]

Attempt to infer better dtype for object columns.

Deprecated since version 0.21.0.

Parameters
convert_datesboolean, default True

If True, convert to date where possible. If ‘coerce’, force conversion, with unconvertible values becoming NaT.

convert_numericboolean, default False

If True, attempt to coerce to numbers (including strings), with unconvertible values becoming NaN.

convert_timedeltasboolean, default True

If True, convert to timedelta where possible. If ‘coerce’, force conversion, with unconvertible values becoming NaT.

copyboolean, default True

If True, return a copy even if no copy is necessary (e.g. no conversion was done). Note: This is meant for internal use, and should not be confused with inplace.

Returns
convertedsame as input object

See also

to_datetime

Convert argument to datetime.

to_timedelta

Convert argument to timedelta.

to_numeric

Convert argument to numeric type.

Scroll To Top