build/lib/data_algebra/cdata.py
def pivot_rowrecs_to_blocks(
    *,
    attribute_key_column,
    attribute_value_column,
    record_keys,
    record_value_columns,
    local_data_model=None
):
    """
    Build a row records to block records map. This is very similar to a SQL unpivot.

    :param attribute_key_column: column to identify record attribute keys
    :param attribute_value_column: column for record attribute values
    :param record_keys: names of key columns identifying row record blocks
    :param record_value_columns: names of columns to take row record values from
    :param local_data_model: data.frame data model
    :return: RecordMap
    """

    if local_data_model is None:
        local_data_model = data_algebra.default_data_model
    control_table = local_data_model.data_frame(
        {
            attribute_key_column: record_value_columns,
            attribute_value_column: record_value_columns,
        }
    )
    ct = RecordSpecification(
        control_table,
        record_keys=record_keys,
        control_table_keys=[attribute_key_column],
        local_data_model=local_data_model,
    )
    return ct.map_from_rows()

    Build a row records to block records map. This is very similar to a SQL unpivot.

    :param attribute_key_column: column to identify record attribute keys
    :param attribute_value_column: column for record attribute values
    :param record_keys: names of key columns identifying row record blocks
    :param record_value_columns: names of columns to take row record values from
    :param local_data_model: data.frame data model
    :return: RecordMap
    
Build a row records to block records map. This is very similar to a SQL unpivot.
Build a row records to block records map . This is very similar to a SQL unpivot .
def pivot_rowrecs_to_blocks(
    *,
    attribute_key_column,
    attribute_value_column,
    record_keys,
    record_value_columns,
    local_data_model=None
):
    if local_data_model is None:
        local_data_model = data_algebra.default_data_model
    control_table = local_data_model.data_frame(
        {
            attribute_key_column: record_value_columns,
            attribute_value_column: record_value_columns,
        }
    )
    ct = RecordSpecification(
        control_table,
        record_keys=record_keys,
        control_table_keys=[attribute_key_column],
        local_data_model=local_data_model,
    )
    return ct.map_from_rows()
def pivot_rowrecs_to_blocks ( * , attribute_key_column , attribute_value_column , record_keys , record_value_columns , local_data_model = None ) : if local_data_model is None : local_data_model = data_algebra . default_data_model control_table = local_data_model . data_frame ( { attribute_key_column : record_value_columns , attribute_value_column : record_value_columns , } ) ct = RecordSpecification ( control_table , record_keys = record_keys , control_table_keys = [ attribute_key_column ] , local_data_model = local_data_model , ) return ct . map_from_rows ( )
Build a row records to block records map.
Build a row records to block records map .
"""
    Build a row records to block records map. This is very similar to a SQL unpivot.

    :param attribute_key_column: column to identify record attribute keys
    :param attribute_value_column: column for record attribute values
    :param record_keys: names of key columns identifying row record blocks
    :param record_value_columns: names of columns to take row record values from
    :param local_data_model: data.frame data model
    :return: RecordMap
    """
None
attribute_key_column
column to identify record attribute keys
column to identify record attribute keys
attribute_value_column
column for record attribute values
column for record attribute values
record_keys
names of key columns identifying row record blocks
names of key columns identifying row record blocks
record_value_columns
names of columns to take row record values from
names of columns to take row record values from
local_data_model
data.frame data model
data . frame data model