Skip to main content

system.kanoa.utilities.convertDatasetToDict

This function requires KanoaCore module

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)
  • Parameters
      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'.
  • Returns
      dictionary - A dictionary of key-value pairs.
  • Code Example

    # Example Usage:
    data_dict = system.kanoa.utilities.convertDatasetToDict(data, 'configName', 'configValue')