I have a pandas dataframe consist of 1 million of rows. this data consist of transaction history of customers, hence, 1 customer might have multiple rows. For each customer, I have a function to run, so I need to use apply lambda function using groupby customer ID. But how do I speed up the process with multithreading? my machine has 8 CPU cores, and I wish to use all of them, currently I am only able to use 1 core. Let's say in those 1 million of rows, and I have total 100k unique customers, I wish to execute 12.5k customers for each CPU core, it would make the process 8 times faster!
Thanks!!