more robust race form
This commit is contained in:
@@ -210,6 +210,11 @@ def handle_check_race_course(self,
|
||||
else:
|
||||
debug = False
|
||||
|
||||
if 'splitsecond' in kwargs:
|
||||
splitsecond = kwargs['splitsecond']
|
||||
else:
|
||||
splitsecond = 0
|
||||
|
||||
mode = 'race'
|
||||
if 'mode' in kwargs:
|
||||
mode = kwargs['mode']
|
||||
@@ -236,10 +241,10 @@ def handle_check_race_course(self,
|
||||
' ElapsedTime (sec)': 'time',
|
||||
}, inplace=True)
|
||||
|
||||
|
||||
rowdata.fillna(method='backfill',inplace=True)
|
||||
|
||||
rowdata['time'] = rowdata['time']-rowdata.ix[0,'time']
|
||||
rowdata = rowdata[rowdata['time']>splitsecond]
|
||||
# we may want to expand the time (interpolate)
|
||||
rowdata['dt'] = rowdata['time'].apply(
|
||||
lambda x: timedelta(seconds=x)
|
||||
|
||||
Reference in New Issue
Block a user