BaşlayınÜcretsiz başlayın

Reading the optimized plan

The naive plan you just printed is the starting point. Before running the query, Polars rewrites it: pushing filters down, dropping columns it doesn't need, and turning sort+head into a fast top-k. Use .explain() to see the optimized plan.

polars is loaded as pl, and the LazyFrame top_titles_by_format is the same query as before.

Bu egzersiz, kursun bir parçasıdır

Scaling and Optimizing Data Pipelines with Polars

Kursa Göz Atın

Egzersiz talimatları

  • Show the optimized plan for top_titles_by_format.

Uygulamalı etkileşimli egzersiz

Bu egzersizi bu örnek kodu tamamlayarak deneyin.

# Show the optimized plan
print(top_titles_by_format.____())
Kodu Düzenle ve Çalıştır