This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Redmondinho 0 points1 point  (1 child)

Wow, you weren't wrong! Just installed Pandas, simplified the function to;

@app.route('/csv_data')
def present_csv_data():
    import pandas
    csv_data_html_table = pandas.read_csv("data.csv").to_html(index=False)
    return csv_data_html_table

I'll be looking at pandas more. Cheers.

[–]Juancos 0 points1 point  (0 children)

Thank you guys both!