Private
Public Access
1
0

small video improvements and bug fix

This commit is contained in:
Sander Roosendaal
2019-12-01 09:58:43 +01:00
parent df95b9593a
commit 49fe549358
2 changed files with 19 additions and 11 deletions

View File

@@ -194,15 +194,18 @@ def get_video_data(w,groups=['basic'],mode='water'):
for c in columns:
if c != 'time':
if dict(rowingmetrics)[c]['numtype'] == 'integer':
data[c] = df2[c].astype(int).tolist()
else:
data[c] = df2[c].values.tolist()
metrics[c] = {
'name': dict(rowingmetrics)[c]['verbose_name'],
'metric': c,
'unit': ''
}
try:
if dict(rowingmetrics)[c]['numtype'] == 'integer':
data[c] = df2[c].astype(int).tolist()
else:
data[c] = df2[c].values.tolist()
metrics[c] = {
'name': dict(rowingmetrics)[c]['verbose_name'],
'metric': c,
'unit': ''
}
except KeyError:
pass
metrics['boatspeed'] = metrics.pop('velo')
# metrics['workperstroke'] = metrics.pop('driveenergy')