Report.add_table1¶
add_table1 ¶
add_table1(data: object, columns: list[str] | tuple[str, ...], *, title: str = 'Cohort characteristics', by: str | None = None, caption: str | None = None, **kwargs) -> ReportItem
Compute and insert one formatted descriptive Table 1 (no p-values).
Example¶
report.add_table1(
df, ['age', 'sex_admin', 'enctype'],
by='cohort', title='Table 1. Cohort characteristics',
)