Add this single word to make your Pandas Apply faster
We as data scientists have got laptops with quad-core, octa-core, turbo-boost. We work with servers with even more cores and computing power.
But do we really utilize the raw power we have at hand?
Sometimes we get limited by the limitation of tools at our disposal. And sometimes we are not willing to write all that extraneous code to save a couple of minutes. And end up realizing only later that time optimization would have helped in the long run.
So, can we do better?
Yes, Obviously.
Previously, I had written on how to make your apply function faster-using multiprocessing , but thanks to the swifter library, it is even more trivial now.
This post is about using the computing power we have at hand and applying it to Pandas DataFrames using Swifter.
Keep reading with a 7-day free trial
Subscribe to MLWhiz | AI Unwrapped to keep reading this post and get 7 days of free access to the full post archives.