I am using the following code to render the dataframe values as HTML and which gets directed to a HTML and it works fine.
@app.route('/index/')
def index():
return render_template('index.html',tables=[df.head().to_html(classes='table table-striped') ] ,titles=df.columns.values )
i do have another dataframe which needs to be used in the same 'index.html'.I tried adding the same in the above code like the below
@app.route('/index/')
def index():
return render_template('index.html',tables=[df.head().to_html(classes='table table-striped'),**dfrme.head().to_html(classes='table1')** ] ,titles=df.columns.values )
It brings up the table one above the other. since i want the other dataframe value to be called in a different area of the index.html need your help for accomplishing the same.
code where it gets rendered:
<table class="w3-table w3-striped w3-border">
<tr>
{% for table in tables %}
{{ table|safe }}
{% endfor %}
</tr>
</table>