1#Converting column to datetime dtype while loading file.
2
3#Create a date parser function
4d_parser = lambda x: pd.to_datetime(x)
5df = pd.read_csv(file_name.csv, parse_dates=['date_column'], date_parser=d_parser)
6
7#If date is not in parseable format, use
8pd.to_datetime.strptime(x, format)
9#Eg. format for '2017-03-13 04-PM' is '%Y-%M-%D %I-%p'
10#Datetime Formatting Codes - http://bit.ly/python-dt-fmt