bug fixes
This commit is contained in:
@@ -157,7 +157,10 @@ def createsporttracksworkoutdata(w):
|
||||
# adding diff, trying to see if this is valid
|
||||
#t = row.df.loc[:,'TimeStamp (sec)'].values-10*row.df.ix[0,'TimeStamp (sec)']
|
||||
t = row.df.loc[:,'TimeStamp (sec)'].values-row.df.loc[:,'TimeStamp (sec)'].iloc[0]
|
||||
t[0] = t[1]
|
||||
try:
|
||||
t[0] = t[1]
|
||||
except IndexError:
|
||||
return 0
|
||||
|
||||
d = row.df.loc[:,'cum_dist'].values
|
||||
d[0] = d[1]
|
||||
|
||||
@@ -388,7 +388,10 @@ def wavg(group, avg_name, weight_name):
|
||||
In rare instance, we may not have weights, so just return the mean. Customize this if your business case
|
||||
should return otherwise.
|
||||
"""
|
||||
d = group[avg_name]
|
||||
try:
|
||||
d = group[avg_name]
|
||||
except KeyError:
|
||||
return 0
|
||||
try:
|
||||
w = group[weight_name]
|
||||
except KeyError:
|
||||
|
||||
Reference in New Issue
Block a user