From the course: Faster pandas

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

What's Cython?

What's Cython?

From the course: Faster pandas

Start my 1-month free trial

What's Cython?

- [Narrator] Cython is a superset of Python. It allows you to write a mix of Python and C like code, to get better runtime, and integration with C or C++. Cython works by writing code, which is very much like Python, in a .pyx file, then you write a set of the .py file, telling Python how to compile this extension, then you run python setup.py build_ext then you run python setup.py build_ext and we're going to tell it to run --inplace so we can import. This is going to generate some intermediate C code, and this C code is going to be compiled to a shared library, and finally during runtime, you can use this model as a regular Python model. You input it and use the function.

Contents