def download_dataframe(): total_dataframe = global_data.get_total_df() response = make_response(total_dataframe.to_csv(sep='\t', index=False)) response.headers[ 'Content-Disposition'] = "attachment; filename=descarga.csv" response.headers['Content-type'] = "text/csv" return response
def homepage(): total_df = global_data.get_total_df() last_load_date = datetime.now() account_ids_list = total_df.account_id.unique() time_line_json = plot.plot_time_lime(account_ids_list[0], total_df, last_load_date) return render_template('dashboard/index.html', title="Dojo Python Panda", time_line_json=time_line_json, account_ids_list=account_ids_list, active_page='dashboard', current_date=datetime.strftime(last_load_date, '%d/%m/%Y'))
def get_time_line_plot(account_id): total_df = global_data.get_total_df() last_load_date = datetime.now() time_line_json = plot.plot_time_lime(account_id, total_df, last_load_date) return time_line_json
def download_dataframe(): total_df = global_data.get_total_df() resp = make_response(total_df.to_csv(sep='\t', index=False)) resp.headers["Content-Disposition"] = "attachment; filename" resp.headers["Content-type"] = "text/csv" return resp
def download_file(): total_df = global_data.get_total_df() res = make_response(total_df.to_csv(sep='\t', index=False)) res.headers['Content-Disposition'] = 'attachment; filename=descarga.csv' res.headers['Content-Type'] = 'text/csv' return res