1from flask import *
2import pandas as pd
3app = Flask(__name__)
4
5@app.route("/tables")
6def show_tables():
7 data = pd.read_excel('dummy_data.xlsx')
8 data.set_index(['Name'], inplace=True)
9 data.index.name=None
10 females = data.loc[data.Gender=='f']
11 males = data.loc[data.Gender=='m']
12 return render_template('view.html',tables=[females.to_html(classes='female'), males.to_html(classes='male')],
13 titles = ['na', 'Female surfers', 'Male surfers'])
14
15if __name__ == "__main__":
16 app.run(debug=True)
17