How to Reduce execution time in for loops in python, as it is taking more a hour for execution?

I have attached the image of above code, the execution time by iterating over the loops is taking more an 60 minutes as it has more than 10,00,000 rows of data

Please let me know a solution by using NUMPY vectorization or Lambda fumctions for reducing execution time

1 answer