@@ -28,14 +28,14 @@ For many use cases writing pandas in pure Python and NumPy is sufficient. In som
28
28
computationally heavy applications however, it can be possible to achieve sizeable
29
29
speed-ups by offloading work to `cython <http://cython.org/ >`__.
30
30
31
- This tutorial assumes you have refactored as much as possible in python , for example
31
+ This tutorial assumes you have refactored as much as possible in Python , for example
32
32
trying to remove for loops and making use of NumPy vectorization, it's always worth
33
33
optimising in Python first.
34
34
35
35
This tutorial walks through a "typical" process of cythonizing a slow computation.
36
36
We use an `example from the cython documentation <http://docs.cython.org/src/quickstart/cythonize.html >`__
37
37
but in the context of pandas. Our final cythonized solution is around 100 times
38
- faster than the pure python .
38
+ faster than the pure Python .
39
39
40
40
.. _enhancingperf.pure :
41
41
@@ -52,7 +52,7 @@ We have a DataFrame to which we want to apply a function row-wise.
52
52
' x' : ' x' })
53
53
df
54
54
55
- Here's the function in pure python :
55
+ Here's the function in pure Python :
56
56
57
57
.. ipython :: python
58
58
@@ -173,7 +173,7 @@ Using ndarray
173
173
174
174
It's calling series... a lot! It's creating a Series from each row, and get-ting from both
175
175
the index and the series (three times for each row). Function calls are expensive
176
- in python , so maybe we could minimize these by cythonizing the apply part.
176
+ in Python , so maybe we could minimize these by cythonizing the apply part.
177
177
178
178
.. note ::
179
179
@@ -231,7 +231,7 @@ the rows, applying our ``integrate_f_typed``, and putting this in the zeros arra
231
231
232
232
.. note ::
233
233
234
- Loops like this would be *extremely * slow in python , but in Cython looping
234
+ Loops like this would be *extremely * slow in Python , but in Cython looping
235
235
over NumPy arrays is *fast *.
236
236
237
237
.. code-block :: ipython
0 commit comments