system.kanoa.utilities.convertDatasetToDict
Description
Given the name of a key column and value column, this function converts a dataset into a dictionary of key-value pairs (kanoaCore).Syntax
convertDatasetToDict(data, keyCol, valueCol)- data (Dataset) - The input dataset.
- keyCol (String) - The name of the key column, e.g., 'configName'.
- valueCol (String) - The name of the value column, e.g., 'configValue'.
- dictionary - A dictionary of key-value pairs.
Code Example
# Example Usage:
data_dict = system.kanoa.utilities.convertDatasetToDict(data, 'configName', 'configValue')