Closed ese-jdm418 closed 2 years ago
It sounds like you are basically building the tree from the ground up correct? The biggest issue here is that when you do that you are basically creating multiple smaller trees and then combining them. There's nothing wrong with that, but you can't do that using just a single Tree
structure. In your case, I would either rearrange the data to start from the top of the tree or just create these individual trees and merge them as you move up across levels.
Going to close this for now, but let me know if you have any more questions
Hi, I have just found this python library and it seems really useful with what I am trying to do regarding looking at stocks and flows with a hierarchal structure.
My only question is that when generating the nodes you have to define what the parent node is, is there a way to generate nodes by defining what the children are instead? As the format of the data I am trying to input provides the children for each node but not the parent.
This is more of a quality of life feature as I could code the data to find the parents to each node but it is just more laborious.
I would be very grateful if anyone could advise me if this is possible.
John.