Closed
Description
from SO
so the null check is pretty cheap. if no nulls, then can just bypass nansafe an use the underlying numpy routine. should be a nice speedup.
``
In [13]: arr = np.random.randint(1,10,size=1000000)
In [14]: s = Series(arr)
In [15]: s.notnull().all()
Out[15]: True
In [16]: %timeit s.notnull().all()
1000 loops, best of 3: 1.35 ms per loop
In [17]: %timeit s.astype(str)
1 loops, best of 3: 2.52 s per loop
In [18]: %timeit s.values.astype(str)
10 loops, best of 3: 37.7 ms per loop