for index, i in df.iterrows():
temp=df.loc[df['security_code']==df['security_code'][index]]
this loop is to map dataframe which has same security code it results in data of similar security code with different dates
above for loop iterates each row in dataframe and dataframe consist of 27,000 rows which takes hours to iterate all the rows
problem is iteration through dataframe which contains huge number of rows takes lot of time and will this loop result in infinte loop?