@@ -45,11 +45,11 @@ def add_path_to_tree(
4545 All paths should start from the same root node.
4646 - For example: Path strings should be "a/b", "a/c", "a/b/d" etc. and should not start with another root node.
4747
48- >>> from bigtree import add_path_to_tree, print_tree
48+ >>> from bigtree import add_path_to_tree
4949 >>> root = Node("a")
5050 >>> add_path_to_tree(root, "a/b/c")
5151 Node(/a/b/c, )
52- >>> print_tree( root)
52+ >>> root.show( )
5353 a
5454 └── b
5555 └── c
@@ -119,7 +119,7 @@ def add_dict_to_tree_by_path(
119119 All paths should start from the same root node.
120120 - For example: Path strings should be "a/b", "a/c", "a/b/d" etc. and should not start with another root node.
121121
122- >>> from bigtree import Node, add_dict_to_tree_by_path, print_tree
122+ >>> from bigtree import Node, add_dict_to_tree_by_path
123123 >>> root = Node("a")
124124 >>> path_dict = {
125125 ... "a": {"age": 90},
@@ -132,7 +132,7 @@ def add_dict_to_tree_by_path(
132132 ... "a/b/e/h": {"age": 6},
133133 ... }
134134 >>> root = add_dict_to_tree_by_path(root, path_dict)
135- >>> print_tree( root)
135+ >>> root.show( )
136136 a
137137 ├── b
138138 │ ├── d
@@ -178,15 +178,15 @@ def add_dict_to_tree_by_name(
178178 Input dictionary keys that are not existing node names will be ignored.
179179 Note that if multiple nodes have the same name, attributes will be added to all nodes sharing same name.
180180
181- >>> from bigtree import Node, add_dict_to_tree_by_name, print_tree
181+ >>> from bigtree import Node, add_dict_to_tree_by_name
182182 >>> root = Node("a")
183183 >>> b = Node("b", parent=root)
184184 >>> name_dict = {
185185 ... "a": {"age": 90},
186186 ... "b": {"age": 65},
187187 ... }
188188 >>> root = add_dict_to_tree_by_name(root, name_dict)
189- >>> print_tree( root, attr_list=["age"])
189+ >>> root.show( attr_list=["age"])
190190 a [age=90]
191191 └── b [age=65]
192192
@@ -235,7 +235,7 @@ def add_dataframe_to_tree_by_path(
235235 - For example: Path strings should be "a/b", "a/c", "a/b/d" etc. and should not start with another root node.
236236
237237 >>> import pandas as pd
238- >>> from bigtree import add_dataframe_to_tree_by_path, print_tree
238+ >>> from bigtree import add_dataframe_to_tree_by_path
239239 >>> root = Node("a")
240240 >>> path_data = pd.DataFrame([
241241 ... ["a", 90],
@@ -250,7 +250,7 @@ def add_dataframe_to_tree_by_path(
250250 ... columns=["PATH", "age"]
251251 ... )
252252 >>> root = add_dataframe_to_tree_by_path(root, path_data)
253- >>> print_tree( root, attr_list=["age"])
253+ >>> root.show( attr_list=["age"])
254254 a [age=90]
255255 ├── b [age=65]
256256 │ ├── d [age=40]
@@ -333,7 +333,7 @@ def add_dataframe_to_tree_by_name(
333333 Note that if multiple nodes have the same name, attributes will be added to all nodes sharing same name.
334334
335335 >>> import pandas as pd
336- >>> from bigtree import add_dataframe_to_tree_by_name, print_tree
336+ >>> from bigtree import add_dataframe_to_tree_by_name
337337 >>> root = Node("a")
338338 >>> b = Node("b", parent=root)
339339 >>> name_data = pd.DataFrame([
@@ -343,7 +343,7 @@ def add_dataframe_to_tree_by_name(
343343 ... columns=["NAME", "age"]
344344 ... )
345345 >>> root = add_dataframe_to_tree_by_name(root, name_data)
346- >>> print_tree( root, attr_list=["age"])
346+ >>> root.show( attr_list=["age"])
347347 a [age=90]
348348 └── b [age=65]
349349
@@ -418,10 +418,10 @@ def str_to_tree(
418418) -> Node :
419419 r"""Construct tree from tree string
420420
421- >>> from bigtree import str_to_tree, print_tree
421+ >>> from bigtree import str_to_tree
422422 >>> tree_str = 'a\n├── b\n│ ├── d\n│ └── e\n│ ├── g\n│ └── h\n└── c\n └── f'
423423 >>> root = str_to_tree(tree_str, tree_prefix_list=["├──", "└──"])
424- >>> print_tree( root)
424+ >>> root.show( )
425425 a
426426 ├── b
427427 │ ├── d
@@ -496,10 +496,10 @@ def list_to_tree(
496496 All paths should start from the same root node.
497497 - For example: Path strings should be "a/b", "a/c", "a/b/d" etc. and should not start with another root node.
498498
499- >>> from bigtree import list_to_tree, print_tree
499+ >>> from bigtree import list_to_tree
500500 >>> path_list = ["a/b", "a/c", "a/b/d", "a/b/e", "a/c/f", "a/b/e/g", "a/b/e/h"]
501501 >>> root = list_to_tree(path_list)
502- >>> print_tree( root)
502+ >>> root.show( )
503503 a
504504 ├── b
505505 │ ├── d
@@ -548,10 +548,10 @@ def list_to_tree_by_relation(
548548 Error will be thrown if names of intermediate nodes are repeated as there will be confusion.
549549 This error can be ignored by setting `allow_duplicates` to be True.
550550
551- >>> from bigtree import list_to_tree_by_relation, print_tree
551+ >>> from bigtree import list_to_tree_by_relation
552552 >>> relations_list = [("a", "b"), ("a", "c"), ("b", "d"), ("b", "e"), ("c", "f"), ("e", "g"), ("e", "h")]
553553 >>> root = list_to_tree_by_relation(relations_list)
554- >>> print_tree( root)
554+ >>> root.show( )
555555 a
556556 ├── b
557557 │ ├── d
@@ -601,7 +601,7 @@ def dict_to_tree(
601601 All paths should start from the same root node.
602602 - For example: Path strings should be "a/b", "a/c", "a/b/d" etc. and should not start with another root node.
603603
604- >>> from bigtree import dict_to_tree, print_tree
604+ >>> from bigtree import dict_to_tree
605605 >>> path_dict = {
606606 ... "a": {"age": 90},
607607 ... "a/b": {"age": 65},
@@ -613,7 +613,7 @@ def dict_to_tree(
613613 ... "a/b/e/h": {"age": 6},
614614 ... }
615615 >>> root = dict_to_tree(path_dict)
616- >>> print_tree( root, attr_list=["age"])
616+ >>> root.show( attr_list=["age"])
617617 a [age=90]
618618 ├── b [age=65]
619619 │ ├── d [age=40]
@@ -657,7 +657,7 @@ def nested_dict_to_tree(
657657 - ``value`` of `name_key` (str): node name.
658658 - ``value`` of `child_key` (List[Dict[str, Any]]): list of dict containing `name_key` and `child_key` (recursive).
659659
660- >>> from bigtree import nested_dict_to_tree, print_tree
660+ >>> from bigtree import nested_dict_to_tree
661661 >>> path_dict = {
662662 ... "name": "a",
663663 ... "age": 90,
@@ -673,7 +673,7 @@ def nested_dict_to_tree(
673673 ... ],
674674 ... }
675675 >>> root = nested_dict_to_tree(path_dict)
676- >>> print_tree( root, attr_list=["age"])
676+ >>> root.show( attr_list=["age"])
677677 a [age=90]
678678 └── b [age=65]
679679 ├── d [age=40]
@@ -733,7 +733,7 @@ def dataframe_to_tree(
733733 - For example: Path strings should be "a/b", "a/c", "a/b/d" etc. and should not start with another root node.
734734
735735 >>> import pandas as pd
736- >>> from bigtree import dataframe_to_tree, print_tree
736+ >>> from bigtree import dataframe_to_tree
737737 >>> path_data = pd.DataFrame([
738738 ... ["a", 90],
739739 ... ["a/b", 65],
@@ -747,7 +747,7 @@ def dataframe_to_tree(
747747 ... columns=["PATH", "age"]
748748 ... )
749749 >>> root = dataframe_to_tree(path_data)
750- >>> print_tree( root, attr_list=["age"])
750+ >>> root.show( attr_list=["age"])
751751 a [age=90]
752752 ├── b [age=65]
753753 │ ├── d [age=40]
@@ -832,7 +832,7 @@ def dataframe_to_tree_by_relation(
832832 columns are `attribute_cols`.
833833
834834 >>> import pandas as pd
835- >>> from bigtree import dataframe_to_tree_by_relation, print_tree
835+ >>> from bigtree import dataframe_to_tree_by_relation
836836 >>> relation_data = pd.DataFrame([
837837 ... ["a", None, 90],
838838 ... ["b", "a", 65],
@@ -846,7 +846,7 @@ def dataframe_to_tree_by_relation(
846846 ... columns=["child", "parent", "age"]
847847 ... )
848848 >>> root = dataframe_to_tree_by_relation(relation_data)
849- >>> print_tree( root, attr_list=["age"])
849+ >>> root.show( attr_list=["age"])
850850 a [age=90]
851851 ├── b [age=65]
852852 │ ├── d [age=40]
0 commit comments