1. 학습
  2. /
  3. 강의
  4. /
  5. Scaling and Optimizing Data Pipelines with Polars

Connected

연습 문제

Fast-path filter on sorted data

The historical analysis team needs every checkout record from before 2021. The CSV is already sorted by date, so if you tell Polars about that, it can stop scanning as soon as the first 2021 row appears.

지침

100 XP
  • Mark the date column as sorted so Polars can use a fast-path scan.
  • Filter to rows where date is before January 1, 2021.
  • Execute the lazy query.