Value
The Value class allows users to create objects to store one-dimensional data (e.g., floats, integers, strings).
- class chromaquant.data.value.Value(data: Any = nan, start_cell: str = '', sheet: str = '', header: str = '', results: Results = None)
Class used to store a single value alongside reporting information.
Parameters
- dataAny, optional
Data to be stored.
- start_cellstr, optional
Reference to cell in Excel where data will be reported. If data contains more than one item, refers to the top-left of report range. Must be a valid Excel cell (e.g., ‘A1’, ‘$B$2’).
- sheetstr, optional
Name of Excel worksheet (sheet within workbook) where data will be reported.
- header: str, optional
Header to add above a dataset, equivalent to a title.
- results: Results, optional
Results object that mediates this DataSet.
Raises
- ValueError
If sheet is set to a blank string.
- ValueError
If start_cell is set to an invalid Excel cell.
- property data: Any
Get, set, or delete data stored in the DataSet. Common types include str, bool, int, float, list, dict, or pandas DataFrame.
- insert() str
Method that returns a unique identifier within a string insert. Used when composing dynamic formulas for reporting to Excel.
Returns
- insert: str
Formula insert containing unique Value identifier.
- property reference
Get the current reference object for the DataSet. Unable to set or delete this value as it is managed internally.
- property sheet: str
Get, set, or delete the name of the Excel worksheet to report to.
- property start_cell: str
Get, set, or delete the Excel reference where data will be reported.