May-17-2018, 09:22 AM
I am using following code to compare each entry in one array with other one .if value of arary element falls with in the range of successive entry in the other array. an entry is made in the file with array index, array element and range number.But it is taking too much time for large ( 1Gb) files from where the array is extracted using pandas dataframe.
for i in range (0,len(array)): for j in range (0, len(array2)-1): if (array[i]< array2[j+1]) and (array[i]> array2[j]) : print array[i], array2[j] filewriter.writerow([i,array[i],j]) break