如何将熊猫分析报告集成到仪表板应用程序中?
Streamlit 允许这些集成(但我很难在其中管理缓存/会话) https://discuss.streamlit.io/t/include-pandas-profiling-report-in-streamlit/473/2
但是我在dash上没有看到任何关于此的文档。请帮忙。
如何将熊猫分析报告集成到仪表板应用程序中?
Streamlit 允许这些集成(但我很难在其中管理缓存/会话) https://discuss.streamlit.io/t/include-pandas-profiling-report-in-streamlit/473/2
但是我在dash上没有看到任何关于此的文档。请帮忙。
您有 2 个选项:
1 - Create the Report
profile = ProfileReport(df, title="Pandas Profiling Report")
profile.to_file("your_report.html")
2 - Load the html report
https://github.com/plotly/dash-core-components/issues/429
1- Install the lib
pip install dash-dangerously-set-inner-html
2- Create the raw report
profile = ProfileReport(df, title="Pandas Profiling Report")
text_raw = profile.to_html()
3- Use it in your dash
app.layout = html.Div([
dash_dangerously_set_inner_html.DangerouslySetInnerHTML('''HTML CODE HERE''')])
app.layout = html.Div([
dash_dangerously_set_inner_html.DangerouslySetInnerHTML(text_raw)])
正如 lib 的名称所说,不建议使用它。