Last active
September 12, 2019 20:00
-
-
Save lukeorland/c707ca852b75cc5658a6ed9694ebbdd4 to your computer and use it in GitHub Desktop.
easy multiprocessing apply pandas
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import multiprocessing | |
pool = multiprocessing.Pool(processes=multiprocessing.cpu_count()) | |
df['normalized_text'] = pool.map(normalize_text, df['text']) | |
pool.close() | |
pool.join() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment