Don’t Write Polars Code with a Pandas Accent
summary
Shows concrete fixes: replace bracket selection with select and pl.col, prefer expressions and chaining over intermediate DataFrames, and use lazy frames so the optimizer does predicate and projection pushdown. Demonstrates a real speed change 31.3 ms vs 17.3 ms, uses tools like pl.sum_horizontal and selectors to add columns horizontally, and shows lazy workflows ending with lazy.collect. Provides runnable code patterns and a measurable before/after, not vague examples.
AI-written summary · about
chapters (11)
- 0:00Polars introduction
- 1:30Pandas accent mistakes
- 3:58Column selection mistake
- 5:45Overusing intermediate vars
- 10:43Chaining improves performance
- 11:46Eager execution mistake
- 15:35Horizontal column addition mistake
- 18:21Using drop vs exclude
- 19:23Idiomatic Polars recap
- 20:06Polars quiz
- 21:53Q&A
related talks
36mUnderstanding Polars Expressions when you're used to pandas
01h 32mAn Introduction to Polars
02h 14mGetting Started with Polars
35mA Tour of the Many DataFrame Frameworks
01h 21mPandas from the Inside
41mWe don't dataframe shame: A love letter to dataframes
36mData Oriented Programming
31mComparing the Different Ways to Scale Python and Pandas Code
