下面的代码在python中运行良好,但是如何从HTML传递参数值呢?
import pandas as pd
import pandas_profiling
# read the file
df = pd.read_csv('Dataprofile.csv')
# run the profile report
profile = df.profile_report(title='Pandas Profiling Report')
# save the report as html file
profile.to_file(output_file="pandas_profiling1.html")
# save the report as json file
profile.to_file(output_file="pandas_profiling2.json")
使用to_html而不是to_file。df.to_html(“table.HTML”)您可以在HTML文件中使用CSS对其进行样式化。