i''m working with a dataframe, i need to do some operations on it and display a table on the web page. the first one is working, the rest don't. what should i do? UPDATE changing the routes also doesn't work
@app.route('/')
def about():
return render_template("about.html", result=df.to_html(header='true'))
@app.route('/')
def problem():
data = df[['attempts', 'activity']]
data = df.groupby('activity').sum().sort_values('attempts', ascending=False)
return render_template("about.html", data=data.to_html(header='true'))
and here's the html part of it
<section id="table">
<h2>table</h2>
<p class="lead" > {{result | safe}}</p>
</section>
<section id="problems">
<h2>problems</h2>
<p class="lead" >{{data | safe}}</p>
</section>