Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pandas read column in date format

from datetime import datetime
dateparse = lambda x: datetime.strptime(x, '%Y-%m-%d %H:%M:%S')

df = pd.read_csv(infile, parse_dates=['datetime'], date_parser=dateparse)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pandas #read #column #date #format
ADD COMMENT
Topic
Name
8+5 =