biogeme.tools.pandas_to_latex module

biogeme.tools.pandas_to_latex.dataframe_to_latex_decimal(df, float_columns=None, include_index=True, caption=None, label=None)[source]

Generate a LaTeX tabular with r@{.}l alignment for float columns.

Return type:

str

Parameters:
  • df (DataFrame)

  • float_columns (Iterable[str] | None)

  • include_index (bool)

  • caption (str | None)

  • label (str | None)

Parameters

df

Input DataFrame.

float_columns

Names of columns to treat as numeric with decimal alignment. If None, all columns with float dtype are used.

include_index

If True, include the index as the first column (left aligned).

caption

Optional LaTeX caption (without caption{} wrapper).

label

Optional LaTeX label, used as label{…} if provided.

Returns

latex

A LaTeX string with begin{tabular} … end{tabular}.