~/talk

What we learned by converting a large codebase from Pandas to Polars

Talkat PyData NYC 2024 · 2024-11-06..11-08· [python]
name:Janssens
links:none on file
name:Nieuwdorp
links:none on file
slides:none on file

Converted about 20,000 lines from Pandas plus some R to Polars, with concrete benchmarks: isolated hotspots drop from 30s → 1s after switching RDS to parquet and using Polars’ lazy API, peak memory falls roughly 500GB → 40GB (≈92% reduction), and a single network job goes from ~5 hours to ~4 hours. The team reports a stated 98% cost reduction overall and the migration is incremental — benchmark small pieces, use lazy where it helps, collect intermediate results to curb peaks, and measure often.

AI-written summary · about

  1. 0:00Pandas to Polars conversion
  2. 3:19Why Polars is fast today
  3. 5:30Alliander project challenges
  4. 8:22Pandas and R bottlenecks
  5. 10:12Convincing team to try Polars
  6. 12:24First benchmark results
  7. 13:06Benchmarking for optimization
  8. 15:55Lazy evaluation with Polars
  9. 17:00Balancing lazy and eager modes
  10. 20:10Polars data types benefits
  11. 21:35Polars avoids Pandas index issues
  12. 22:59Polars missing value handling
  13. 24:25Migration process steps
  14. 25:29Joining Polars community
  15. 26:13Final conversion results
  16. 28:45Key migration lessons
  17. 29:08Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.