Home

Published

- 1 min read

date parser python pandas

img of date parser python pandas

The solution for this is noted below

date parser python pandas

Solution

   mydateparser = lambda x: pd.datetime.strptime(x, "%Y %m %d %H:%M:%S")
df = pd.read_csv("file.csv", sep='\t', names=['date_column', 'other_column'], parse_dates=['date_column'], date_parser=mydateparser)

Try other methods by searching on the site. That is if this doesn’t work