Idiomatic Pandas
summary
Uses Pandas 1.2.3 on a ~40,000-row, 83-column auto dataset and shows concrete wins: convert integer/float columns (cylinders from float to int), parse dates and turn low-cardinality strings into categorical to cut memory from 19 MB to 7 MB, create derived columns (automatic, speed, engine flags), build a reusable tweak function pipeline, prefer chained operations + assign to avoid SettingWithCopy and in-place myths, avoid apply for numeric work because vectorized ops are about 50x faster, and use groupby/agg/unstack for clear aggregations and plots.
AI-written summary · about
chapters (6)
- 0:00Idiomatic Pandas
- 1:58Correct data types
- 14:23Chaining operations
- 19:13Avoid apply
- 22:41Group by and pivot tables
- 27:31Summary
related talks
35mIdiomatic Pandas
32mPandas May Be Slow, but Pandas Doesn't Have to Be
29mMaking Pandas Fly
40mBeyond Pandas: The Great Python Dataframe Showdown
44mHigh Perfomance Pandas
35mFast Pandas Performance Tricks You Wish You Knew Earlier
25mPandas on Jupyter: Improving Your Data Analysis Workflow
21mHow to use Pandas Efficiently
