Working with dates and times in Pandas
summary
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
chapters (10)
- 0:00Dates and times in Pandas
- 2:22Timestamps and time deltas
- 6:33Loading datetime data
- 11:24String dates to datetime
- 14:11Extracting datetime components
- 18:30Trip durations with time deltas
- 21:38Datetime indexes
- 24:47Slicing time series
- 25:29Resampling time series
- 27:32Q&A
related talks
28mTimes and Dates in Pandas
24mPandas on Steroids
01h 24mIntroduction to Data-Analysis with Pandas
25mPandas on Jupyter: Improving Your Data Analysis Workflow
01h 52mIntroduction to data analytics with pandas
01h 31mPandas, Data Wrangling & Data Science
21mHow to use Pandas Efficiently
31mEffective Data Analysis with Pandas Indexes
