napistu_torch.utils.table_utils
Utilities for creating and formatting tables.
Functions
Format a metrics DataFrame as a markdown table. |
- napistu_torch.utils.table_utils.format_metrics_as_markdown(df: DataFrame) str
Format a metrics DataFrame as a markdown table.
- Parameters:
df (pd.DataFrame) – DataFrame with columns [‘metric’, ‘value’]
- Returns:
Formatted markdown table
- Return type:
str
Examples
>>> df = pd.DataFrame({ ... 'metric': ['Validation AUC', 'Test AUC'], ... 'value': [0.8923, 0.8856] ... }) >>> print(format_metrics_as_markdown(df)) | Metric | Value | |--------|-------| | Validation AUC | 0.8923 | | Test AUC | 0.8856 |