0PricingLogin
Data Science Academy · Lesson

Resample to Daily or Monthly

Rolling time into bigger buckets.

Too Much Detail to See

Per-second or per-minute data is noisy. Often you really want totals per day or per month. Resampling rolls fine timestamps into bigger buckets. 📊

A Datetime Index First

Resample works on time. So step one is making the datetime column your index with set_index.

df = df.set_index("date")

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