aixd.data.utils_data.reformat_dataframe_to_dict
- aixd.data.utils_data.reformat_dataframe_to_dict(dataframe: DataFrame, listwrap: bool = False) Dict[source]
- Reformats data formatted as a dataframe into a dictionary. In the intended usage, each row of the dataframe corresponds to one data sample and each row to a data object. The column names will be mapped to keys in the dictionary. To access a particular value, use: dct[column_name_as_key][nth_sample][ith_dimension]. - Parameters:
- dataframe (pd.DataFrame) – A dataframe object. 
- listwrap (bool, optional, default=False) – If True, 1-dimensional values will be put into a 1-item list (e.g., 3.14 -> [3.14]). 
 
- Returns:
- Dict – A dictionary.