~/talk

Fast Pandas Performance Tricks You Wish You Knew Earlier

Talkat PythonAsia 2026 · on Saturday, 2026-03-21· at 15:30· Yuchengco Hall 5th Flr. Y507 (Workshop Room 1)· [data-science, python]
name:Allen Y
links:none on file
links:none on file
slides:none on file

Pandas is fast if used right: use vectorization instead of Python loops or apply — on a 1M-row, 95 MB test the loop version takes ~12.5s vs 0.08s vectorized (~150×). Fix dtypes with convert to categorical and downcast numerics to cut memory and speed joins/groupbys; avoid chained ops to prevent hidden copies and prefer boolean masking with .loc. Use read_csv(usecols, dtype), measure with %timeit and df.info, and consider Polars and DuckDB or Parquet/Feather for parallelism, lazy eval, and columnar IO.

AI-written summary · about

  1. 0:00Faster pandas intro
  2. 1:11Why pandas slows down
  3. 9:14Slow pandas mistakes
  4. 13:31Fixing data types
  5. 17:24Avoiding hidden copies
  6. 21:55Optimizing joins and group by
  7. 24:47Better file formats than CSV
  8. 27:19Pandas alternatives
  9. 32:18Fast pandas takeaways
~/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.