imputr.domain.table#

Module Contents#

Classes#

Table

Data class that encapsulates the data and imputr-specific metadata of a table.

class imputr.domain.table.Table(data: pandas.DataFrame, predefined_datatypes: Dict[str, Union[str, imputr.domain.DataType]] = None)#

Data class that encapsulates the data and imputr-specific metadata of a table.

Variables
  • data (pd.DataFrame) – The Pandas DataFrame that contains the table data.

  • columns (Dict[str, Union[str, DataType]] (optional)) – Dictionary that has column names as key and the data type as specified in the Column constructor as value.

Parameters
  • data (pd.DataFrame) – The Pandas DataFrame that contains the table data.

  • predefined_datatypes (Dict[str, Union[str, DataType]] (optional)) – Dictionary that has column names as key and the data type as specified in the Column constructor as value.

data :pandas.DataFrame#
columns :List[imputr.domain.Column]#
_construct_columns(data: pandas.DataFrame, predefined_datatypes) List[imputr.domain.Column]#

Loops over dataframe columns to construct Column objects.

Parameters
  • data (pd.DataFrame) – The Pandas DataFrame that contains the columns.

  • predefined_datatypes (Dict[str, Union[str, DataType]] (optional)) – Dictionary that has column names as key and the data type as specified in the Column constructor as value.

Returns

List[Column] (the List of constructed Column objects.)