~/talk

Working with dates and times in Pandas

Talkat Conf42 Python 2021 · on Thursday, 2021-05-27· [data-science, python]
slides:none on file

Live coding in a Jupyter notebook shows reading taxi.csv with pd.read_csv and using parse_dates to convert pickup/dropoff strings into 64-bit timestamps, extracting components via the dt accessor, and subtracting timestamps to create a trip_time timedelta column. The dataset has 10,000 rows, yields 84 trips under one minute and one 12.5‑hour outlier. Indexing by timestamp enables label slicing and resample('1H') aggregations (mean, count) to summarize trips hourly.

AI-written summary · about

  1. 0:00Dates and times in Pandas
  2. 2:22Timestamps and time deltas
  3. 6:33Loading datetime data
  4. 11:24String dates to datetime
  5. 14:11Extracting datetime components
  6. 18:30Trip durations with time deltas
  7. 21:38Datetime indexes
  8. 24:47Slicing time series
  9. 25:29Resampling time series
  10. 27:32Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.