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.
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.