def parse_dates(x):
    return dt.datetime.strptime(x, '%Y%m%d %H:%M:%S')
word_to_int = {'zero': 0, 'one': 1, 'two': 2, 'three': 3, 'four': 4, 'five':
    5, 'six': 6, 'seven': 7, 'eight': 8, 'nine': 9}

def str_to_time_delta(x):
    num = 0
if 'hour' in x.lower():
    num = x[0:x.find(' ')].lower()
return dt.timedelta(hours=word_to_int[num])
df = pd.read_csv('c:\\temp1.txt', parse_dates=[0], date_parser=parse_dates)
df.dtypes
How to get pandas.read_csv() to infer datetime and timedelta types from CSV file columns?