changes
This commit is contained in:
@@ -37,6 +37,7 @@ from polars.exceptions import (
|
||||
ColumnNotFoundError, SchemaError, ComputeError,
|
||||
InvalidOperationError, ShapeError
|
||||
)
|
||||
from pandas.errors import IntCastingNaNError
|
||||
|
||||
from rowingdata import (
|
||||
KinoMapParser,
|
||||
@@ -257,7 +258,10 @@ def get_video_data(w, groups=['basic'], mode='water'):
|
||||
df2 = pd.concat([df2, coordinates], axis=1)
|
||||
latitude = df2['latitude']
|
||||
longitude = df2['longitude']
|
||||
try:
|
||||
boatspeed = (100*df2['velo'].fillna(method='ffill').fillna(method='bfill')).astype(int)/100.
|
||||
except IntCastingNaNError:
|
||||
boatspeed = 0.0*df2['longitude']
|
||||
# bundle data
|
||||
data = {
|
||||
'boatspeed': boatspeed.values.tolist(),
|
||||
|
||||
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
Binary file not shown.
@@ -418,6 +418,8 @@ def trendflexdata(workouts, options, userid=0):
|
||||
return ('', 'Error: not enough data')
|
||||
except TypeError:
|
||||
return ('','Error: something wrong with the data')
|
||||
except KeyError:
|
||||
return ('','Error: no {groupby} data'.format(groupby=groupby))
|
||||
else: # pragma: no cover
|
||||
try:
|
||||
bins = np.arange(datadf['days ago'].min()-binsize,
|
||||
|
||||
Reference in New Issue
Block a user