|
6 | 6 | from bigtree.utils.assertions import ( |
7 | 7 | assert_dataframe_no_duplicate_attribute, |
8 | 8 | assert_dataframe_not_empty, |
9 | | - assert_key_not_in_dict_or_df, |
10 | 9 | assert_length_not_empty, |
| 10 | + assert_not_reserved_keywords, |
11 | 11 | filter_attributes, |
12 | 12 | isnull, |
13 | 13 | ) |
@@ -109,7 +109,7 @@ def dict_to_dag( |
109 | 109 | parent_names: List[str] = [] |
110 | 110 | if parent_key in node_attrs: |
111 | 111 | parent_names = node_attrs.pop(parent_key) |
112 | | - assert_key_not_in_dict_or_df(node_attrs, ["parent", "parents", "children"]) |
| 112 | + assert_not_reserved_keywords(node_attrs, ["parent", "parents", "children"]) |
113 | 113 |
|
114 | 114 | if child_name in node_dict: |
115 | 115 | child_node = node_dict[child_name] |
@@ -194,7 +194,7 @@ def dataframe_to_dag( |
194 | 194 | attribute_cols = list(data.columns) |
195 | 195 | attribute_cols.remove(child_col) |
196 | 196 | attribute_cols.remove(parent_col) |
197 | | - assert_key_not_in_dict_or_df(attribute_cols, ["parent", "parents", "children"]) |
| 197 | + assert_not_reserved_keywords(attribute_cols, ["parent", "parents", "children"]) |
198 | 198 |
|
199 | 199 | data = data[[child_col, parent_col] + attribute_cols].copy() |
200 | 200 |
|
|
0 commit comments