pandas.to_datetime()

pandas.to_datetime

pandas.to_datetime(*args, **kwargs)

Convert argument to datetime.

Parameters:

arg : string, datetime, list, tuple, 1-d array, Series

errors : {‘ignore’, ‘raise’, ‘coerce’}, default ‘raise’

  • If ‘raise’, then invalid parsing will raise an exception
  • If ‘coerce’, then invalid parsing will be set as NaT
  • If ‘ignore’, then invalid parsing will return the input

dayfirst : boolean, default False

Specify a date parse order if arg is str or its list-likes. If True, parses dates with the day first, eg 10/11/12 is parsed