Open zenz opened 1 month ago
If drawing multiple tables in a for loop. the arrangement for first two tables will be conflict.
import mercury as mr # for widgets import pandas as pd app = mr.App(title="Test", description="Table test") category = ["model1", "model2", "model3", "model4"] employee = ["employeeA", "employeeB", "employeeC"] for emp in employee: temp_df = pd.DataFrame( columns=["类别", "对比年总销售额", "对比年同期销售额", "今年同期销售额", "同期增长额", "同期增长比例%"] ) for x in category: temp_df.loc[len(temp_df)] = [ x, 1, 1, 1, 1, 1, ] mr.Table(data=temp_df, width="800px", text_align="center")
Please see pictures below
If drawing multiple tables in a for loop. the arrangement for first two tables will be conflict.
Please see pictures below