Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in Python by (47.6k points)

How can I convert a DataFrame column of strings (in dd/mm/yyyy format) to datetimes?

1 Answer

0 votes
by (106k points)

To convert DataFrame column type from string to datetime, dd/mm/yyyy format the easiest way is to use to_datetime:

df['col'] = pd.to_datetime(df['col'])

Related questions

0 votes
1 answer
asked Jul 25, 2019 in Python by Eresh Kumar (45.3k points)
0 votes
1 answer
0 votes
1 answer

Browse Categories

...