Closed pytofu closed 1 month ago
Hello,
I am running into a strange issue. I am testing out pygwalker in a flask app. The relevant code is here
app.py customers_df = generate_mock_data() elected_data = customers_df
Get Pygwalker as html html_str = pyg.walk(selected_data, return_html = True) return render_template('index.html', html_str=html_str)
And my index.html file has
But when I run this locally, it always renders as follows
<pygwalker.api.pygwalker.PygWalker object at 0x14a183f20>
What could be the reason for this? I am happy to send the complete code over if you'd like
Thanks for making this awesome library
Never mind, I figured it out.
The correct way to render html is html_str = pyg.to_html(selected_data)
And in the html file, use {{html_str | safe}}
Thanks!
Hello,
I am running into a strange issue. I am testing out pygwalker in a flask app. The relevant code is here
app.py customers_df = generate_mock_data() elected_data = customers_df
Get Pygwalker as html html_str = pyg.walk(selected_data, return_html = True) return render_template('index.html', html_str=html_str)
And my index.html file has
But when I run this locally, it always renders as follows
<pygwalker.api.pygwalker.PygWalker object at 0x14a183f20>
What could be the reason for this? I am happy to send the complete code over if you'd like
Thanks for making this awesome library