antimatter.cap_prep.prep#

Module Contents#

Classes#

Preparer

Preparer is a helper class to prepare data for encapsulation, packing it in

Functions#

column_definitions(...)

Helper function for packaging column definitions.

data_elements(...)

Helper function for packaging data elements. Applies span tags to matching cell

class antimatter.cap_prep.prep.Preparer#

Preparer is a helper class to prepare data for encapsulation, packing it in the intermediary data formats.

classmethod prepare(col_names: List[str], col_tags: List[antimatter.tags.ColumnTag], skip_classify_col_names: List[str], raw_data: List[List[bytes]], span_tags: List[antimatter.tags.SpanTag], extra_dict: Dict[str, Any]) Tuple[List[antimatter_engine.PyColumnDefinition], List[List[antimatter_engine.PyDataElement]]]#

Prepare the columns, raw data, and tags, packing into the intermediary data formats.

Parameters:
  • col_names – The names of the columns in the data set

  • col_tags – User-provided tags for entire columns of data

  • skip_classify_col_names – List of columns to skip classification on

  • raw_data – The data set in generic format

  • span_tags – User-provided span tags to bundle with the data

  • extra_dict – Dictionary containing metadata for data handling and formatting

Returns:

Wrapped column definitions and data elements

antimatter.cap_prep.prep.column_definitions(col_names: List[str], col_tags: List[antimatter.tags.ColumnTag], skip_classify_col_names: List[str]) List[antimatter_engine.PyColumnDefinition]#

Helper function for packaging column definitions.

Parameters:
  • col_names – The names of the columns in the data set

  • col_tags – User-provided tags for entire columns of data

  • skip_classify_col_names – List of columns to skip classification on

Returns:

Wrapped column definitions

antimatter.cap_prep.prep.data_elements(col_names: List[str], raw_data: List[List[bytes]], span_tags: List[antimatter.tags.SpanTag], extra_dict: Dict[str, Any]) List[List[antimatter_engine.PyDataElement]]#

Helper function for packaging data elements. Applies span tags to matching cell data where applicable.

Parameters:
  • col_names – The names of the columns in the data set

  • raw_data – The data set in generic format

  • span_tags – User-provided span tags to bundle with the data

  • extra_dict – Dictionary containing metadata for data handling and formatting

Returns:

Wrapped data elements