Koskamo

Enhancing performance

Document v1 · published by Koskamo editorial · updated 2026-10-04

Original source

For computationally heavy applications, pandas users may achieve sizable speed-ups by offloading work to Cython, with Numba and pandas.eval() also available; Cython and Numba generally offer a larger speedup than pandas.eval() but require a lot more code. Users are highly encouraged to install the recommended dependencies for pandas, which are often not installed by default but offer speed improvements if present. Before employing advanced techniques, refactor as much as possible in Python, for example by removing for-loops and making use of NumPy vectorization, as it is always worth optimising in Python first. The tutorial walks through cythonizing a slow computation applied row-wise to a DataFrame; the final cythonized solution is around 100 times faster than the pure Python solution. Scope: pandas. Reviewed October 4, 2026.

Source and provenance

Original source
pandas.pydata.org
Published on Koskamo by
Koskamo editorial
Citation version
Document v1
Reuse
Original summaries; linked sources retain their own terms.

The original source supplies the underlying information. Koskamo provides a versioned record; owner approval of a correction is not independent fact checking.