~/talk

High Perfomance Pandas

Talkat PyCon Latam 2019 · 2019-08-29..08-31· [data-science, python]
links:none on file
slides:none on file

Shows concrete Pandas patterns and timings: building a DataFrame from a dict with pd.DataFrame.from_dict(..., orient="index") cuts load from ~30s to ~3s for 10k rows; use append/concat for bulk adds not single-row appends; prefer vectorized apply/assign/json_normalize + pd.merge(how="inner") over building lists and iterating; use the add operator or fillna (≈7ms) instead of loc/iloc (≈148ms) for inplace edits; query outperforms loc after ~100k–200k rows. Notebook: https://github.com/LuisDavidCamacho/high-performance-pandas

AI-written summary · about

  1. 0:00Introduction and setup
  2. 1:08Why pandas performance matters
  3. 2:55Efficient data frame creation
  4. 5:02Fast row iteration with apply
  5. 7:33Combining data sets cleanly
  6. 13:46Custom calculations without loops
  7. 19:50Complex data extraction from objects
  8. 20:13Fast data manipulation with operators
  9. 23:03Multi-index for faster queries
  10. 28:56Query method vs loc for speed
  11. 33:00Arithmetic and statistical operations
  12. 35:53Built-in data visualization
  13. 37:15Exporting data to LaTeX
  14. 37:37JSON normalization tips
  15. 38:21Loading data from URLs
  16. 39:02Splitting data by type
  17. 40:31Window and expanding methods
  18. 43:12Conclusion and resources
~/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.