I need help to understand data trees

if you deal with Python, data trees can be thought as nested lists, lists of lists

for instance, the data tree:

{0;0} : a, b, c
{0;1} : d, e, f
{1;0} : g, h, i
{1;1} : j, k, l

can be represented as: [ [ [a, b, c], [d, e, f] ], [ [g, h, i], [j, k , l] ] ]

maybe it’s easier to “see” it like this:

the other important thing you need to consider is that within GH data-tree matching -generally speaking- ignores path addresses ( examples here: Feature request: Trim tree option on component outputs - #8 by inno )
so the most important thing is the number of paths of two different data-trees to match, otherwise the principle of the Longest List will take action (the last item/branch of the shorter one will be repeated/duplicated until it reaches the same length of the longer one)
there are a few cases were the above “rule of thumb” is not valid, but they are easily recognizable: for instance what is indicated as “Pattern” will just repeat itself in its whole length, instead of repeating just the last element (which is the reason why they are called Patterns :slight_smile: )

with the above info, treehelpers from ghpythonlib gives you a very sharp weapon to use, and I believe it will work in the vast majourity of your cases

at this link you can find some examples of treehelpers in action, but also an example of how to code data trees directly in Python: https://developer.rhino3d.com/guides/rhinopython/grasshopper-datatrees-and-python/