Data Analysis Journal

Data Analysis Journal

Python

Data Analysis in Python: A Guide to Working With Dates in Pandas - Issue 211

A quick datetime reference guide for handling and parsing dates in Python Pandas.

Olga Berezovsky's avatar
Olga Berezovsky
Jul 03, 2024
∙ Paid

Welcome to the Data Analysis Journal, a weekly newsletter about data science and analytics.


Date transformations are annoying and time-consuming, regardless of whether it’s SQL, Python, R, or English. I often get stuck on the most basic things, like dates. It is very frustrating.

I want to share this reference guide today, mostly so I can have it close for myself. I still have to use it at least once per week. Hopefully, it will save you time when working with UTC-to-datetime conversions, parsing strings to datetime, or handling anything dates-related.   

For Python Pandas, I’ve compiled many (if not all) known variations of datetimes solutions for any case, which you can see below. If I missed something common (I am sure I did), please let me know, and I’ll add it. 

Keep reading with a 7-day free trial

Subscribe to Data Analysis Journal to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Olga Berezovsky · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture