I have two data frame iterations and want to optimize it using pandas or numpy vectorization. As of now, my code is consuming almost 5 GB memories for 10000 data. Please see the