Q:

Is the pandas .apply function vectorised? 

Does the pandas df.apply(x, axis=1) method apply the function x to all the rows simultaneously, or iteratively?  I had a look in the docs but didn't find anything. 

A:

It's iteratively:
In [11]: df = pd. DataFrame([[1, 2], [3, 4]], columns=["A", "B"])

In [12]: def f(row):
             f.count += 1
             return f.count

In [13]: f.count = 0

In [14]: df.apply(f, axis=1)
Out[14]:
0    1
1    2
dtype: int64

Note: Although in this example it doesn't seem to be the case the documentation warns:

In the current implementation apply calls func twice on the first column/row to decide whether it can take a fast or slow code path.  This can lead to unexpected behavior if func has side-effects, as they will take effect twice for the first column/row. 

The actual for loop (for python  functions rather than ufuncs) happens in lib.reduce (here).