From Raw Recruit Scripts to Perfect Python
summary
Converts a messy Jupyter notebook into modular, testable Python: replaces ad‑hoc CSV parsing with intake catalogs, adds pytest unit tests (including doctest checks and negative cases), enforces style with pylint/pyland and finds bugs, and profiles hotspots with %timeit and line_profiler before accelerating math with numpy and numba. Example outcomes: a broken parse_location function gets reliable tests and fixes; an RMSE loop drops from ~1.3 s to ~10 ms then ~6 ms after compilation; artifacts loadable from GitHub and the tests pass.
AI-written summary · about
chapters (7)
- 0:00Introduction
- 10:10Reproducibility in Python
- 21:22Data sourcing with Intake
- 44:09Unit testing with pytest
- 1:01:05Code quality with pylint
- 1:09:57Performance optimization
- 1:23:00Conclusion and Q&A
related talks
02h 14mHands-on Python for Programmers
28mGoing From Notebooks to Scalable Systems
01h 28mMaintainable code in data science
27mNotebook To Production
01h 28mTesting with Pytest for Data Science
28mUnlock the Full Potential of Jupyter Notebooks
41mBetter Code for Data Science
42mSimplifying Data Analysis with GitHub Codespaces, Jupyter Notebooks & Open AI
