|
@@ -115,7 +115,7 @@ def put_analysis_report_to_html(args, df_predict, df_accuracy):
|
|
df_predict = df_predict.applymap(lambda x: float(x.to_decimal()) if isinstance(x, Decimal128) else float(x) if isinstance(x, numbers.Number) else x).sort_values(by=col_time)
|
|
df_predict = df_predict.applymap(lambda x: float(x.to_decimal()) if isinstance(x, Decimal128) else float(x) if isinstance(x, numbers.Number) else x).sort_values(by=col_time)
|
|
if acc_flag > 0:
|
|
if acc_flag > 0:
|
|
df_accuracy = df_accuracy.applymap(lambda x: float(x.to_decimal()) if isinstance(x, Decimal128) else float(x) if isinstance(x, numbers.Number) else x).sort_values(by=col_time)
|
|
df_accuracy = df_accuracy.applymap(lambda x: float(x.to_decimal()) if isinstance(x, Decimal128) else float(x) if isinstance(x, numbers.Number) else x).sort_values(by=col_time)
|
|
- figs = [create_fig(df_predict, col_time, label, label_pre, p) for p in points]
|
|
|
|
|
|
+ figs = [create_fig(df_predict, col_time, label, label_pre, int(p)) for p in points]
|
|
# 将折线图保存为 HTML 片段
|
|
# 将折线图保存为 HTML 片段
|
|
power_htmls = [pio.to_html(f, full_html=False) for f in figs]
|
|
power_htmls = [pio.to_html(f, full_html=False) for f in figs]
|
|
power_htmls = ["<div class='plot-container'>{}</div>".format(html) for html in power_htmls]
|
|
power_htmls = ["<div class='plot-container'>{}</div>".format(html) for html in power_htmls]
|