Skip to content

pd.to_datetime

pandas.to_datetime(arg, errors='raise', dayfirst=False, yearfirst=False, utc=None, format=None, exact=True, unit=None, infer_datetime_format=False, origin='unix', cache=True)

Supported Arguments

argument datatypes other requirements
arg Series, Array or scalar of integers or strings
errors String and one of ('ignore', 'raise', 'coerce')
dayfirst Boolean
yearfirst Boolean
utc Boolean
format String matching Pandas strftime/strptime
exact Boolean
unit String
infer_datetime_format Boolean
origin Scalar string or timestamp value
cache Boolean

Note

  • The function is not optimized.
  • Bodo doesn't support Timezone-Aware datetime values

Example Usage

>>> @bodo.jit
... def f(val):
...     return pd.to_datetime(val, format="%Y-%d-%m")

>>> val = "2016-01-06"
>>> f(val)

Timestamp('2016-06-01 00:00:00')