Formula
The Formula class enables users to create formulas through a series of processing steps. First, users add a string with or without inserts from DataSets to a Formula instance. Then, users can use insert_references to replace these string inserts with cell references. Resulting formulas can refer to any combination of individual cells or ranges of cells.
- class chromaquant.formula.formula.Formula(formula: str = '', key_pointer: str = '', table_pointer: str = '')
SPECIAL METHODS
- property formula_string
- get_formula_cell_inserts()
- insert_references(dataset_references: dict[str, dict[Any]])
- point_to(key_or_column_id: str, table_id: str = '')
- process_table_formula_inserts()
Parameters
None
Returns
- new_formulalist or str
New formula or list of new formulas.
Raises
- ValueError
‘Insert list contains non-key or non-table elements’
- ValueError
‘Formula missing necessary keys’
- ValueError
‘Passed output pointers do not point to either a value or table’
- process_value_formula_inserts()
Parameters
None
Returns
- new_formulastr
New formula.
Raises
- ValueError
‘Formula missing necessary keys’
- static replace_insert(formula, raw, reference)