report.Table#
- class Table#
Bases:
ReportItemRepresents a table within a report, with configurable data and headers.
Attributes
- data: list[str | Delta | DataItem]#
A list of table data entries, which can be either strings or Delta objects.
- formatter: str | list[str, optional], optional#
Formatter can be a single str (e.g. “.4g”) or a list of str of the same length as
data- Default:
None
Additional Constructors
- classmethod from_file(filename)#
Load a Flow360BaseModel from a .json file.
- Parameters:
filename (str)
- Return type:
Flow360BaseModel
Methods
- get_requirements()#
Returns requirements for this item
- calculate_table_data(context)#
Calculate raw table data (headers + rows) without formatting.
- to_dataframe(context)#
Convert calculated data into a Pandas DataFrame for unit-testing or external usage.
- Parameters:
context (ReportContext)
- get_doc_item(context, settings=None)#
Returns a LaTeX doc item (Tabulary) for the table, using previously calculated data.
- Parameters:
context (ReportContext)
settings (Settings | None)
- Return type:
None