to_datetime
- typhon.utils.to_datetime(obj)[source]
Convert an object to a python datetime object.
- Parameters:
obj – Can be a string with time information, a numpy.datetime64 or a pandas.Timestamp object.
- Returns:
A python datetime object.
Examples:
dt = to_datetime("2017-12-04 12:00:00") # dt is datetime.datetime(2017, 12, 4, 12, 0)