query module¶
-
class
query.
ResultSet
(table, data)¶ Bases:
object
-
query.
get_data_for_child
(child, parent_row)¶ A parent row (represented as a pandas dataframe) contains aggregates of its children rows. Extract this info to return the actual covariance matrix and column distribution for its children.
Parameters: - child (model.Table) – object representing the child
- parent_row (pandas.DataFrame) – pandas.DataFrame with 1 row and a column for each column name in raw
-
query.
synth_children
(table, PKID)¶ Synthesize children rows of a particular parent table row. Params: :param table: The parent table object
Parameters: PKID (str) – The primary key ID of the parent row in the the table Returns: dict<str, ResultSet> Raises: Exception – Given primary key ID does not exist
-
query.
synth_row
(table, *args, **kwargs)¶ Synthesizes a complete row, or the rest of the row if its partially observed.
Parameters: - table (model.Table) – the table for which we want to synthesize the row
- *args (dict<str, ResultSet>) – A mapping of child name –> Result Set object representing observed children for that table
Returns: ResultSet