Further Reading: Working with Dates, Times, and Time Series Data

You now have the tools to parse dates, compute rolling averages, and analyze time-dependent data. If you want to go deeper into time series analysis or understand the mechanics behind the tools you used, here are resources organized by interest.


Tier 1: Verified Sources

These are published books with full bibliographic details.

Wes McKinney, Python for Data Analysis: Data Wrangling with pandas, NumPy, and Jupyter (O'Reilly, 3rd edition, 2022). Chapter 11 of McKinney's book covers time series data in extensive detail: date ranges, frequencies, shifting, lagging, resampling, and moving window functions. Since McKinney created pandas, his treatment of the DatetimeIndex, Period, and Timedelta types is authoritative. If you want to understand the design decisions behind pandas' time series API — why resample works the way it does, why there are both Timestamp and Period types — this is the source.

Robert H. Shumway and David S. Stoffer, Time Series Analysis and Its Applications: With R Examples (Springer, 4th edition, 2017). This is a standard graduate-level textbook on time series analysis, covering autoregressive models, spectral analysis, state-space models, and ARIMA. It uses R, not Python, but the statistical concepts are language-independent. If the rolling averages and resampling in this chapter made you curious about formal time series modeling — forecasting, trend decomposition, seasonality detection — Shumway and Stoffer provide the mathematical foundations. The first few chapters are accessible to anyone comfortable with basic statistics.

Jake VanderPlas, Python Data Science Handbook: Essential Tools for Working with Data (O'Reilly, 2nd edition, 2023). VanderPlas covers pandas time series functionality in Chapter 3 of the second edition, with clear examples of date parsing, time zone handling, resampling, and window functions. His style is concise and example-driven, making it a good complement to McKinney's more comprehensive treatment. The section on time zone handling is particularly clear.

Rob J. Hyndman and George Athanasopoulos, Forecasting: Principles and Practice (OTexts, 3rd edition, 2021). This is the most accessible introduction to time series forecasting available. The authors (Hyndman created the widely-used forecast package in R) emphasize practical forecasting over mathematical derivation. The book covers decomposition, exponential smoothing, ARIMA, and regression with time series. The third edition uses R, but a Python companion using the statsforecast library exists. Freely available online at otexts.com/fpp3. If you want to go from "analyzing what happened" to "predicting what will happen," start here.

Aileen Nielsen, Practical Time Series Analysis: Prediction with Statistics and Machine Learning (O'Reilly, 2020). This book bridges traditional statistical time series methods and modern machine learning approaches, all in Python. It covers date handling, feature engineering with time data, classical models (ARIMA, exponential smoothing), and machine learning models (random forests, neural networks) applied to time series. If you want a Python-centric path from the basics we covered in this chapter to advanced forecasting, Nielsen's book provides it.


Tier 2: Attributed Resources

These are articles, talks, and online resources that are well-known in the data science community.

pandas documentation on time series / date functionality (pandas.pydata.org). The official pandas documentation has an extensive section on "Time series / date functionality" that covers every topic from this chapter in detail. It includes documentation for DatetimeIndex, Period, Timedelta, resample, rolling, frequency aliases, timezone handling, and more. Bookmark the "Time Series" section — you'll return to it regularly.

Our World in Data, "Coronavirus (COVID-19) Vaccinations" (ourworldindata.org). The real-world equivalent of Case Study 2. Our World in Data maintains one of the most comprehensive public datasets on global COVID-19 vaccination, with daily updates, per-capita calculations, and 7-day rolling averages — exactly the techniques we covered. Exploring their data and methodology section will show you how professional data teams handle the same challenges Elena faced: missing dates, population normalization, and cross-country comparison.

Matt Harrison, "Effective Pandas" (online course and book, 2023). Harrison's materials focus specifically on pandas best practices, including extensive coverage of date handling, the .dt accessor, and time series operations. His approach is practical and opinionated — he'll tell you not just how to do something, but the best way to do it in pandas. Search for "Matt Harrison Effective Pandas" to find the latest version.

Python datetime module documentation (docs.python.org). Before pandas dates, there's Python's built-in datetime module. Understanding datetime.datetime, datetime.timedelta, and datetime.strptime will help you when you encounter datetime objects outside of pandas — in file handling, web scraping, or database queries. The official docs include format code tables and examples.


  • If you want more time series practice: Download daily stock price data (Yahoo Finance provides free historical data), daily weather data (NOAA's Climate Data Online), or COVID-19 data (Our World in Data) and repeat the analyses from this chapter on a new dataset. The practice of applying the same workflow to different data is how the techniques become automatic.

  • If you want to learn forecasting: Start with Hyndman and Athanasopoulos's Forecasting: Principles and Practice. In Python, the statsmodels library provides ARIMA and exponential smoothing, and prophet (by Meta) provides an accessible forecasting API. We'll touch on simple prediction models in Part V of this book.

  • If you're working on the vaccination project: Apply the techniques from this chapter to your cleaned dataset: parse all date columns, set up a DatetimeIndex, compute rolling averages, and identify trends. Then move on to Chapter 12 to load additional data sources, or to Chapter 14 to start visualizing your time series.

  • If time zones fascinated you: Read Paul Ganssle's "Working with Time Zones in Python" (a PyCon talk available on YouTube). Ganssle is the maintainer of Python's dateutil library and provides an excellent overview of why time zones are so complicated and how to handle them correctly.

  • If you want to understand the calendar itself: The Wikipedia article on the Gregorian calendar is surprisingly informative about leap year rules, historical calendar reforms, and why February has 28 days. Understanding the calendar's quirks helps you understand why date arithmetic is so tricky for computers.