seqme.show

Contents

seqme.show#

seqme.show(df, *, n_decimals=2, color='#68d6bc', color_style='solid', notation='decimals', na_value='-', show_arrow=True, level=0, hline_level=None, caption=None)[source]#

Display a metric dataframe as a styled table.

Render a styled DataFrame that:
  • Combines ‘value’ and ‘deviation’ into “value ± deviation”.

  • Highlights the best metric per column with color.

  • Underlines the second-best metric per column.

  • Arrows indicate maximize (↑) or minimize (↓).

  • Vertical divider between columns.

Parameters:
  • df (DataFrame) – Metric dataframe.

  • n_decimals (int | list[int]) – Decimal precision for formatting. Value is rounded. Deviation is rounded up.

  • color (str | None) – Color for highlighting best scores. If None, no coloring.

  • color_style (Literal['solid', 'gradient', 'bar']) – Style of the coloring. Ignored if color is None.

  • notation (Union[Literal['decimals', 'exponent'], list[Literal['decimals', 'exponent']]]) – Whether to use scientific notation (exponent) or fixed-point notation (decimals).

  • na_value (str) – Text to show for cells with no metric value, i.e., cells with NaN values.

  • show_arrow (bool) – Whether to include the objective arrow in the column names.

  • level (int) – The tuple index-names level to consider as a group.

  • hline_level (Optional[int]) – When to add horizontal lines seperaing model names. If None, add horizontal lines at the first level if more than 1 level.

  • caption (Optional[str]) – Bottom caption text. If None, no caption is added.

Returns:

pandas Styler object.

Return type:

Styler