10 Your data under a different lens: Window functions

This chapter covers:

  • Window functions and the kind of data transformation they enable
  • Summarizing, ranking, and analyzing data using the different classes of window functions
  • Building static, growing, and unbounded windows to your functions
  • Apply UDF to windows as custom window functions

When performing data analysis or feature engineering (which is my favorite part of machine learning; see chapter 13), nothing makes me quite as happy as window functions. On first glance, they look like a watered-down version of the split-apply-combine pattern introduced in chapter 9. Then you open the blinds and bam—powerful manipulations in a short, expressive body of code.

Those who don’t know window ...

Get Data Analysis with Python and PySpark now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.