show_solutions

site.SiteSolutionSet.show_solutions(
    rounding=2,
    n_best=None,
    expand_dict_columns=False,
    inplace=False,
)

Return the solution DataFrame with rounded values.

Parameters

Name Type Description Default
rounding int Number of decimal places to round numeric columns to. 2
expand_dict_columns bool If True, any column holding dict values – the equity-group breakdowns (weighted_by_equity_group, coverage_by_equity_group, etc.) and their secondary-matrix equivalents when solve(..., full_secondary_metrics=True) was used – is expanded into one column per dict key, named <column>__<key>. This is usually more useful for display/export than a column of dicts, but is off by default to keep solution_df’s shape unchanged for existing callers. False
inplace bool If True (and expand_dict_columns=True), the expansion is also written back to self.solution_df, so it persists for subsequent calls, plotting, sort_by, etc. Has no effect unless expand_dict_columns=True, in which case a UserWarning is raised instead, since passing inplace=True alone does nothing and likely indicates the caller meant to also pass expand_dict_columns=True. Rounding is never made permanent – only the column expansion can be. False

Returns

Name Type Description
pandas.DataFrame The solution DataFrame with numeric values rounded to the specified precision.

Notes

Unless inplace=True, this method does not modify the underlying DataFrame; it returns a rounded (and optionally expanded) copy.

Back to top