system.kanoa.utilities.createTreeHierarchy
Description
Takes a dataset and appends an extra 'path' column based on the passed-in levels. Levels are column names that the data will be grouped by. For example, if levels are 'column1', 'column2', 'column3', the path of a row will be "value1\value2\value3".Syntax
createTreeHierarchy(inputData, *levels)- inputData: dataset
- *levels: tuple - i.e., column1, column2, column3
- data - dataset
Code Example
# Example Usage:
data = system.kanoa.utilities.createTreeHierarchy(inputData, 'ItemClassCode', 'ItemClassName', 'ItemName')