I currently have a for loop that creates a pandas dataframe on each iteration and launches a function where that dataframe is the argument for the function:
for ii in hold_:
temp_df = runners_df[runners_df['market_id'] == ii]
from odds import odds
odds(temp_df )
Is there a way I can run the all the versions of the function called in the loop independently but concurrently. I want to add a variable time delay within the function, so some versions of the function in the loop may not finish for 5 hours, while some will finish almost instantaneously. Can I use threading for this?
Thanks!