ordering in mysql
This commit is contained in:
@@ -2699,11 +2699,11 @@ def interactive_chart(id=0,promember=0,intervaldata = {}):
|
||||
row = Workout.objects.get(id=id)
|
||||
if datadf.empty:
|
||||
return "","No Valid Data Available"
|
||||
else:
|
||||
try:
|
||||
datadf.sort_values(by='time',ascending=True,inplace=True)
|
||||
except KeyError:
|
||||
return "","No valid data available"
|
||||
#else:
|
||||
# try:
|
||||
# datadf.sort_values(by='time',ascending=True,inplace=True)
|
||||
# except KeyError:
|
||||
# return "","No valid data available"
|
||||
|
||||
try:
|
||||
spm = datadf['spm']
|
||||
@@ -2715,10 +2715,6 @@ def interactive_chart(id=0,promember=0,intervaldata = {}):
|
||||
except KeyError:
|
||||
datadf['pace'] = 0
|
||||
|
||||
#datadf,row = dataprep.getrowdata_db(id=id)
|
||||
#if datadf.empty:
|
||||
#return "","No Valid Data Available"
|
||||
|
||||
source = ColumnDataSource(
|
||||
datadf
|
||||
)
|
||||
@@ -3526,11 +3522,11 @@ def interactive_flex_chart2(id=0,promember=0,
|
||||
row = Workout.objects.get(id=id)
|
||||
if rowdata.empty:
|
||||
return "","No valid data",'','',workstrokesonly
|
||||
else:
|
||||
try:
|
||||
rowdata.sort_values(by='time',ascending=True,inplace=True)
|
||||
except KeyError:
|
||||
pass
|
||||
#else:
|
||||
# try:
|
||||
# rowdata.sort_values(by='time',ascending=True,inplace=True)
|
||||
# except KeyError:
|
||||
# pass
|
||||
|
||||
workoutstateswork = [1,4,5,8,9,6,7]
|
||||
workoutstatesrest = [3]
|
||||
@@ -4094,11 +4090,11 @@ def thumbnails_set(r,id,favorites):
|
||||
'notes':""
|
||||
}]
|
||||
|
||||
else:
|
||||
try:
|
||||
rowdata.sort_values(by='time',ascending=True,inplace=True)
|
||||
except KeyError:
|
||||
pass
|
||||
# else:
|
||||
# try:
|
||||
# rowdata.sort_values(by='time',ascending=True,inplace=True)
|
||||
# except KeyError:
|
||||
# pass
|
||||
|
||||
l = len(rowdata)
|
||||
maxlength = 50
|
||||
@@ -4673,13 +4669,13 @@ def interactive_comparison_chart(id1=0,id2=0,xparam='distance',yparam='spm',
|
||||
|
||||
if rowdata1.empty:
|
||||
return "","No Valid Data Available"
|
||||
else:
|
||||
rowdata1.sort_values(by='time',ascending=True,inplace=True)
|
||||
# else:
|
||||
# rowdata1.sort_values(by='time',ascending=True,inplace=True)
|
||||
|
||||
if rowdata2.empty:
|
||||
return "","No Valid Data Available"
|
||||
else:
|
||||
rowdata2.sort_values(by='time',ascending=True,inplace=True)
|
||||
# else:
|
||||
# rowdata2.sort_values(by='time',ascending=True,inplace=True)
|
||||
|
||||
try:
|
||||
x1 = rowdata1.loc[:,xparam]
|
||||
|
||||
Reference in New Issue
Block a user