gustavorsantos
Published in

gustavorsantos

Use swifter for Faster Pandas in Python

A single word can make a difference…

Boost the speed of Pandas with a single word added to the code.
Use the swifter package (pip install swifter)

Python users probably use Pandas for data manipulation in Data Science.
When applying functions (apply) to columns, processing by Pandas is based on loops. Therefore, the larger the dataset, the longer the execution time — line by line, repeating the operation.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Gustavo Santos

Data Scientist. I extract insights from data to help people and companies to make better and data driven decisions. | In: https://www.linkedin.com/in/gurezende/