gooddata_pandas.result_convertor.DataFrameMetadata

class gooddata_pandas.result_convertor.DataFrameMetadata(row_totals_indexes: List[List[int]], execution_response: BareExecutionResponse)

Bases: object

DataFrameMetadata class stores metadata about a DataFrame.

Attributes: - row_totals_indexes: A nested list of integers. Each inner list represents

the row indices containing totals per index header column. Example: Category | Country | Budget Car | Arizona | 100

Texas | 50
SUM | 150
Train | Arizona | 200 => [[7],[3,6]]
Texas | 100
AVG | 150

SUM | | 450

  • execution_response: An instance of BareExecutionResponse representing the

    execution response.

__init__(row_totals_indexes: List[List[int]], execution_response: BareExecutionResponse) None

Method generated by attrs for class DataFrameMetadata.

Methods

__init__(row_totals_indexes, execution_response)

Method generated by attrs for class DataFrameMetadata.

from_data(headers, execution_response)

This method constructs a DataFrameMetadata object from data headers and an execution response.

Attributes

row_totals_indexes

execution_response

classmethod from_data(headers: Tuple[List[List[Any]], Optional[List[List[Any]]]], execution_response: BareExecutionResponse) DataFrameMetadata

This method constructs a DataFrameMetadata object from data headers and an execution response.

Args: headers (Tuple[_DataHeaders, Optional[_DataHeaders]]):

A tuple containing data headers. execution_response (BareExecutionResponse): An ExecutionResponse object.

Returns: DataFrameMetadata: An initialized DataFrameMetadata object.