1. Learn
  2. /
  3. Courses
  4. /
  5. Working with Dates and Times in Python

Connected

Exercise

Timezones in Pandas

Earlier in this course, you assigned a timezone to each datetime in a list. Now with Pandas you can do that with a single method call.

(Note that, just as before, your data set actually includes some ambiguous datetimes on account of daylight saving; for now, we'll tell Pandas to not even try on those ones. Figuring them out would require more work.)

Instructions 1/2

undefined XP
    1
    2

Make the Start date column timezone aware by localizing it to 'America/New_York' while ignoring any ambiguous datetimes.