comparison scripts/process.py @ 1070:0154133e77df

corrected bug
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Tue, 17 Jul 2018 10:34:39 -0400
parents 9ee5c7636640
children 58994b08be42
comparison
equal deleted inserted replaced
1069:9ee5c7636640 1070:0154133e77df
325 for name, group in data.groupby(['site', 'date', 'intervalend15']): 325 for name, group in data.groupby(['site', 'date', 'intervalend15']):
326 row = [] 326 row = []
327 row.extend(name) 327 row.extend(name)
328 groupStartTime = group.time.min() 328 groupStartTime = group.time.min()
329 groupEndTime = group.time.max() 329 groupEndTime = group.time.max()
330 row.append((groupEndTime.minute-groupStartTime.minute) % 60)#(name[2].minute*60+name[2].second-groupStartTime.minute*60+groupStartTime.second) % 3600) 330 row.append((groupEndTime.minute+1-groupStartTime.minute) % 60)#(name[2].minute*60+name[2].second-groupStartTime.minute*60+groupStartTime.second) % 3600)
331 row.append(len(group)) 331 row.append(len(group))
332 for h in dataColumns: 332 for h in dataColumns:
333 for method,func in aggFunctions.items(): 333 for method,func in aggFunctions.items():
334 aggregated = func(group[h]) 334 aggregated = func(group[h])
335 if method == 'centile': 335 if method == 'centile':