I have got 2 lists for which I would like to compare to one index before :
for (min,max) in zip(csv_parse(2010)['min'],csv_parse(2010)['max']):
basically I would like something like this :
if min > min(back one increment) and max < max (back on increment)
then, do something .
Thanks !
Switch the values of
prev_minandprev_maxabove the loop if you do want to “do something” on the first item.Also, you probably want to use
izipfor something like this. You also probably don’t want to be parsing your csv twice (once for min, once for max) but I don’t know for sure without seeing whatcsv_parseis.