Pandas is a very handy library when it comes to handling data for data science but its there is always some need of manipulation of data for various purposes and when you have a dataframe as large as 700k cells and you need to apply a complex function on each cell its frustrating how much time it takes,
I have not seen the underlying code for apply function but there is a serious need for optimization there.
It took me several hours on a xenon cpu with 28 cores to perform this operation.
Comment From: jreback
.apply
is basically a python for loop. this should be your last resort for processing. best to put up a minimal example and ask on Stack Overflow.