pygacity.generate.answerset module¶
A class for handling answer sets in pygacity
- class pygacity.generate.answerset.AnswerSet(data: dict = {}, serial: int = 0, serialstr: str = None)[source]¶
Bases:
UserDict- classmethod from_yaml(filename: str, delete: bool = False)[source]¶
Create an AnswerSet instance by loading from a YAML file of the same format as that generated by the to_yaml() method.
- register(index: any, label: str = None, value: any = None, units: str = None, formatter: str = None, group: int = None)[source]¶
Register an answer entry for a particular question index.
- Parameters:
index (any) – the question index
label (str, optional) – the label for the answer entry
value (any, optional) – the value of the answer entry
units (str, optional) – the units of the answer entry
formatter (str, optional) – a format string for displaying the value
group (int, optional) – a group identifier for the answer entry
- class pygacity.generate.answerset.AnswerSuperSet(initial: list[AnswerSet] = [])[source]¶
-
A collection of AnswerSet instances with methods to convert to pandas DataFrames and LaTeX tables.