Time Zones and Date Ranges
Localizing and generating dates.
Time Has a Place
9 a.m. in Tokyo is not 9 a.m. in London. Real-world timestamps need a time zone so they mean the same moment everywhere. 🌍
Naive vs Aware
A timestamp with no zone is called naive. One that knows its zone is aware. Mixing the two leads to silent, painful bugs.
ts = pd.Timestamp("2024-03-15 09:00")
print(ts.tz) # None means naiveAll lessons in this course
- Parse Strings Into Datetimes
- Extract Year, Month, and Weekday
- Resample to Daily or Monthly
- Time Zones and Date Ranges