@@ -567,7 +567,6 @@ def nested_dict_to_tree(
567
567
node_attrs : dict ,
568
568
name_key : str = "name" ,
569
569
child_key : str = "children" ,
570
- sep : str = "/" ,
571
570
node_type : Type [Node ] = Node ,
572
571
) -> Node :
573
572
"""Construct tree from nested recursive dictionary.
@@ -605,7 +604,6 @@ def nested_dict_to_tree(
605
604
value of `child_key` (list): list of dict containing `name_key` and `child_key` (recursive)
606
605
name_key (str): key of node name, value is type str
607
606
child_key (str): key of child list, value is type list
608
- sep (str): path separator of created tree, defaults to `/`
609
607
node_type (Type[Node]): node type of tree to be created, defaults to Node
610
608
611
609
Returns:
@@ -622,7 +620,6 @@ def recursive_add_child(child_dict, parent_node=None):
622
620
return node
623
621
624
622
root_node = recursive_add_child (node_attrs )
625
- root_node .sep = sep
626
623
return root_node
627
624
628
625
@@ -728,7 +725,6 @@ def dataframe_to_tree_by_relation(
728
725
child_col : str = "" ,
729
726
parent_col : str = "" ,
730
727
attribute_cols : list = [],
731
- sep : str = "/" ,
732
728
node_type : Type [Node ] = Node ,
733
729
) -> Node :
734
730
"""Construct tree from pandas DataFrame using parent and child names, return root of tree.
@@ -772,8 +768,7 @@ def dataframe_to_tree_by_relation(
772
768
parent_col (str): column of data containing parent name information, defaults to None
773
769
if not set, it will take the second column of data
774
770
attribute_cols (list): columns of data containing node attribute information,
775
- if not set, it will take all columns of data except `path_col`
776
- sep (str): path separator of input `path_col` and created tree, defaults to `/`
771
+ if not set, it will take all columns of data except `child_col` and `parent_col`
777
772
node_type (Type[Node]): node type of tree to be created, defaults to Node
778
773
779
774
Returns:
@@ -839,5 +834,4 @@ def dataframe_to_tree_by_relation(
839
834
child_node = node_type (** node_attrs )
840
835
child_node .parent = parent_node
841
836
842
- root_node .sep = sep
843
837
return root_node
0 commit comments