first routines with polars
This commit is contained in:
@@ -296,7 +296,10 @@ def analysis_new(request,
|
||||
df = cpdata(tw, options)
|
||||
options['savedata'] = False
|
||||
request.session['options'] = options
|
||||
response = HttpResponse(df.to_csv())
|
||||
try:
|
||||
response = HttpResponse(df.to_csv())
|
||||
except AttributeError:
|
||||
response = HttpResponse(df.write_csv())
|
||||
code = str(uuid4())
|
||||
filename = code+'.csv'
|
||||
chartform.fields['savedata'].initial = False
|
||||
@@ -568,7 +571,7 @@ def flexalldata(workouts, options):
|
||||
workstrokesonly = not includereststrokes
|
||||
columns = [xparam, yparam1, yparam2, 'spm', 'driveenergy', 'distance']
|
||||
ids = [int(w.id) for w in workouts]
|
||||
df = dataprep.getsmallrowdata_db(columns, ids=ids,
|
||||
df = dataprep.getsmallrowdata_pl(columns, ids=ids,
|
||||
workstrokesonly=workstrokesonly,
|
||||
doclean=True,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user