Example #1
0
 def stuff_tree_into_trans(trans: Ledger, tree: Tree) -> pd.DataFrame:
     """Convert the tree into full account name format and add/update the
     full account field in trans accordingly.
     This should probably be a static method on TransFrame, once that Class exists."""
     paths = tree.get_dict_of_paths()
     trans[CONST["fan_col"]] = trans[CONST["account_col"]].map(paths)
     return trans