Window Operations—Rolling

Categories of windowing operations

Windowing operations are one of the features in pandas that stand at the intersection of grouping and aggregation. The idea is to divide the data into partitions (aka windows of time) and then calculate an aggregate function for each window instead of the entire dataset.

There are four categories of windowing operations, namely:

  • Rolling windows

  • Weighted windows

  • Expanding windows

  • Exponential moving windows

We’ll use the Amazon (AMZN) stock prices in 2017 as the primary dataset for the code examples in this lesson.

Get hands-on with 1200+ tech skills courses.