forestploter.ForestData
- class forestploter.ForestData(frame, spans=(), mapping=<factory>, source=None, sheet_name=None, source_rows=(), cell_references=())[source]
Store a renderable long table and its source-cell structure.
- Parameters:
- framepandas.DataFrame
Source long-table values. Each estimate record describes one series in one CI column with one statistical triple.
- spanstuple of ForestCellSpan, default ()
Supported XLSX vertical merges. CSV input always produces an empty tuple.
- mappingForestDataMapping, default ForestDataMapping()
Reserved-field mapping.
- sourcepathlib.Path or None, default None
Absolute input path. It may be
Nonewhen constructed directly from a DataFrame.- sheet_namestr or None, default None
XLSX worksheet name;
Nonefor CSV.- source_rowstuple of int, default ()
One-based source-file row number for every record.
- cell_referencestuple of tuple of str, default ()
Source references with the same shape as
frame, for example"Forest!D7"or"D7"for CSV.
- Parameters:
frame (DataFrame)
spans (tuple[ForestCellSpan, ...])
mapping (ForestDataMapping)
source (Path | None)
sheet_name (str | None)
source_rows (tuple[int, ...])
cell_references (tuple[tuple[str, ...], ...])
Notes
XLSX “what you see is what you enter” applies to values, record order, and supported vertical merges. The plot does not copy Excel fonts, fills, borders, column widths, or row heights. For a conventional parent-child hierarchy, put shared values on a
headerrow and give each series an indented child_plot_row; no merge is required. On the header record, leave_series,_ci_column, andestimate/lower/upperblank; use_indent=0and_is_summary=False. To show one series in several CI columns, duplicate its record, keep the same_plot_row, and change_ci_column; all CI columns then share the same vertical coordinate.- __init__(frame, spans=(), mapping=<factory>, source=None, sheet_name=None, source_rows=(), cell_references=())
- Parameters:
frame (DataFrame)
spans (tuple[ForestCellSpan, ...])
mapping (ForestDataMapping)
source (Path | None)
sheet_name (str | None)
source_rows (tuple[int, ...])
cell_references (tuple[tuple[str, ...], ...])
- Return type:
None
Methods
__init__(frame[, spans, mapping, source, ...])cell_reference(record, column)Return the source-cell reference for one record and field.
Attributes
cell_referencessheet_namesourcesource_rowsspansframemapping