aixd.data.utils_data.reformat_dataframeflat_to_dataframe

aixd.data.utils_data.reformat_dataframeflat_to_dataframe(dataframeflat: pd.DataFrame, dataobjects: List[DataObject]) pd.DataFrame[source]

Reformats a flattened dataframe into a dataframe that may represent multidimensional data objects (cells containing n lists of values, if dim>1). In the flattened dataframe, all cells contain single values and column names are renamed.

Parameters:
  • dataframeflat (pd.DataFrame) – A dataframe with flattened data (one value per cell).

  • dataobjects (List[DataObject]) – A list of data objects from the dataset.

Returns:

pd.DataFrame – New dataframe with collapsed columns (for data objects with dim>1).