Last active
October 20, 2017 22:27
-
-
Save mindey/c18222d940dafebd8076f005761f53b7 to your computer and use it in GitHub Desktop.
This file contains 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 pandas | |
import multiprocessing | |
def apply_parallel(grouped_df, func): | |
with multiprocessing.Pool(multiprocessing.cpu_count()) as p: | |
ret_list = p.map(func, [group for name, group in grouped_df]) | |
return pandas.concat(ret_list) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment