0Pricing
Data Science Academy · Lesson

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 naive

All lessons in this course

  1. Parse Strings Into Datetimes
  2. Extract Year, Month, and Weekday
  3. Resample to Daily or Monthly
  4. Time Zones and Date Ranges
← Back to Data Science Academy