DataFrameFactory.

for_exec_result_id

for_exec_result_id(result_id: str, label_overrides: Optional[LabelOverrides], result_cache_metadata: Optional[ResultCacheMetadata], result_size_dimensions_limits: ResultSizeDimensions, result_size_bytes_limit: Optional[int], use_local_ids_in_headers: bool, use_primary_labels_in_attributes: bool, page_size: int, optimized: bool, default=False, grand_totals_position: Literal['pinnedBottom', 'pinnedTop', 'bottom', 'top']) -> tuple[pandas.DataFrame, DataFrameMetadata]

Retrieves a DataFrame and DataFrame metadata for a given execution result identifier.

Example of label_overrides structure:

.. code-block:: python

    {
        "labels": {
            "local_attribute_id": {
                "title": "My new attribute label"
            ,...
        },
        "metrics": {
            "local_metric_id": {
                "title": "My new metric label"
            },...
        }
    }</p>

Parameters

nametypedescription
result_idstrExecution result identifier.
label_overridesOptional[LabelOverrides]Label overrides for metrics and attributes.
result_cache_metadataOptional[ResultCacheMetadata]Cache metadata for the execution result.
result_size_dimensions_limitsResultSizeDimensionsA tuple containing maximum size of result dimensions.
result_size_bytes_limitOptional[int]Maximum size of the result in bytes.
use_local_ids_in_headersboolUse local identifier in headers.
use_primary_labels_in_attributesboolUse primary labels in attributes.
page_sizeintNumber of records per page.
optimizedbool, default=FalseUse memory optimized accumulator if True; by default, the accumulator stores headers in memory as lists of dicts, which can consume a lot of memory for large results. Optimized accumulator stores only unique values and story only reference to them in the list, which can significantly reduce memory usage.
grand_totals_positionLiteral['pinnedBottom', 'pinnedTop', 'bottom', 'top']Position where grand totals should be placed. "pinnedBottom" and "bottom" append totals, "pinnedTop" and "top" prepend totals. Defaults to "bottom".

Returns

typedescription
tuple[pandas.DataFrame, DataFrameMetadata]Tuple[pandas.DataFrame, DataFrameMetadata]: Tuple holding DataFrame and DataFrame metadata.