import numpy as np temp = [20.68,21.04,20.43,21.6,21.97,22.12,22.15,22.5,22.53,22.6,23.2,23.49,23.47,23.38,22.71,22.69,22.96,23.16,23.86,23.77,24.21,24.22,23.79,24.85,25.3,25.56,25.65,24.94,24.87,25.23,25.03,25.12,24.85,25.57,26.01,26.19,26.17,27.1,27.09,26.38,25.9,26.4,27.27,27.55,27.75,27.61,28.0,29.07,30.45,30.0,28.92,29.21,29.21,30.07,30.83,30.09,29.59,28.85,28.35,28.58] rh = [55.02,53.39,50.6,47.89,44.75,44.08,45.84,47.35,46.24,46.76,45.17,41.27,42.44,45.24,47.9,48.17,46.8,46.01,46.28,48.69,46.46,43.14,45.66,44.67,44.15,43.71,44.65,45.44,43.93,42.41,41.11,40.12,41.87,41.49,39.97,39.37,38.49,37.63,38.04,38.95,40.28,40.08,38.59,38.01,37.87,36.16,33.61,32.33,30.56,31.28,33.11,32.73,33.41,32.99,33.12,34.73,34.82,36.71,38.37,39.31] dt = ["2016-12-08T15:00:00Z","2016-12-08T15:05:00Z","2016-12-08T15:10:00Z","2016-12-08T15:15:00Z","2016-12-08T15:20:00Z","2016-12-08T15:25:00Z","2016-12-08T15:30:00Z","2016-12-08T15:35:00Z","2016-12-08T15:40:00Z","2016-12-08T15:45:00Z","2016-12-08T15:50:00Z","2016-12-08T15:55:00Z","2016-12-08T16:00:00Z","2016-12-08T16:05:00Z","2016-12-08T16:10:00Z","2016-12-08T16:15:00Z","2016-12-08T16:20:00Z","2016-12-08T16:25:00Z","2016-12-08T16:30:00Z","2016-12-08T16:35:00Z","2016-12-08T16:40:00Z","2016-12-08T16:45:00Z","2016-12-08T16:50:00Z","2016-12-08T16:55:00Z","2016-12-08T17:00:00Z","2016-12-08T17:05:00Z","2016-12-08T17:10:00Z","2016-12-08T17:15:00Z","2016-12-08T17:20:00Z","2016-12-08T17:25:00Z","2016-12-08T17:30:00Z","2016-12-08T17:35:00Z","2016-12-08T17:40:00Z","2016-12-08T17:45:00Z","2016-12-08T17:50:00Z","2016-12-08T17:55:00Z","2016-12-08T18:00:00Z","2016-12-08T18:05:00Z","2016-12-08T18:10:00Z","2016-12-08T18:15:00Z","2016-12-08T18:20:00Z","2016-12-08T18:25:00Z","2016-12-08T18:30:00Z","2016-12-08T18:35:00Z","2016-12-08T18:40:00Z","2016-12-08T18:45:00Z","2016-12-08T18:50:00Z","2016-12-08T18:55:00Z","2016-12-08T19:00:00Z","2016-12-08T19:05:00Z","2016-12-08T19:10:00Z","2016-12-08T19:15:00Z","2016-12-08T19:20:00Z","2016-12-08T19:25:00Z","2016-12-08T19:30:00Z","2016-12-08T19:35:00Z","2016-12-08T19:40:00Z","2016-12-08T19:45:00Z","2016-12-08T19:50:00Z","2016-12-08T19:55:00Z"] temp = np.array(temp) rh = np.array(rh) dt = np.array(dt) #what time did we see the minimum temperature? mint = temp.min() print mint #ok, but at what time was that? idx = 0 i = 0 for t in temp: if t == mint: idx = i i += 1 print idx print dt[idx] #or... idx = np.argmin(temp) print dt[idx], temp[idx] #find the max? idx = np.argmax(temp) print dt[idx], temp[idx], idx #what's the temperature and time of the min RH? print dt[np.argmin(rh)], temp[np.argmin(rh)], rh.min() #how about where temp is gt 24? r = np.where(temp > 24.0) #how about finding all rh values and times where temp is gt 24? print rh[r], dt[r] #how about the temp of min value of the subset of that rh? sub_rh = rh[r] idx = np.argmin(sub_rh) print temp[r[0][idx]] #what is this? print temp < 24 print rh > 48 r = np.where( (temp < 24) & (rh > 48)) print (rh > 48).sum() print (temp < 24).sum() #find all temps less than the mean of all temps. temp[(temp < temp.mean())] import numpy as np a = np.arange(10) * 10 b = np.sin(np.arange(10)) c = np.array(['yes', 'yes', 'no','yes', 'yes', 'no','yes', 'yes', 'no','no' ]) d = np.arange(10) % 2 result = np.where( (a > 10) &( a < 90) & (c == 'no') & (d) & (b < 0))