How do I convert a string to a column to a date in Python?

If your date column is a string of the format ‘2017-01-01’ you can use pandas astype to convert it to datetime . You can try it with other formats then ‘%Y-%m-%d’ but at least this works.

Sizin İçin Seçtik  How do I add Strptime to a DataFrame column?

Leave a Reply

Your email address will not be published. Required fields are marked *