Optimizing Manipulations Using Cython

See the optimization of string manipulations using Cython.

We'll cover the following

The previous example uses apply, and it’s clear by now that we don’t prefer that method because it’s slow. Let’s divert from strings for a minute and look at making the apply operation quicker using Cython.

Cython is a superset of Python that can compile to native code. To enable it in Jupyter, you’ll need to run the following cell magic:

Get hands-on with 1400+ tech skills courses.