From the course: Fundamentals of Data Transformation for Data Engineering

Unlock the full course today

Join today to access over 24,100 courses taught by industry experts.

Windows

Windows

- [Instructor] In this lesson, we're going to talk about windows in the context of Pandas. And windows for Pandas are a little different than windows for SQL. There are a much smaller subset of operations that Pandas windows perform, and you can check that out in the documentation. But there are four really types of windowing operations in Pandas. We're really going to focus on two of those, specifically rolling windows and expanding windows. And you can think of rolling windows as a rolling sum or a rolling average that we talked about in the SQL lesson on windows. And expanding windows are kind of like a cumulative sum, an accumulating window over values, but we're going to focus on those two. So let's walk through something very similar to what we did before. First, we actually have to import the library and load the DataFrame before we can define our alert date column, which is just the date/time variant of our last index date. And we're going to pick up where we left off. So, if…

Contents