I’m looking to map information from a dataframe, in Revit 2020, as CPython3 is not available, I can’t use pandas so I have to do it old-school
The objective is to obtain the indices of a list with depth 4, (List of Elements by category with List of Parameters with Sublist Values) vs List of Elements of category with List of Elements) .
The detail is that the mapping is done by brute force and I cannot unstructured the list to reduce the complexity, so although some elements are not contained within the list of the parameters I have to pass it to avoid a value placement error.
The clearest example would be seen here, I have to pass the empty lists of elements within the comments list, and then continue through list two that if it has elements.
# The inputs to this node will be stored as a list in the IN variables. IndexVals = IN TLFParN = IN ListVal =  # Place your code below this line for LSval in TLFParN: templist =  for LVal,indices in zip(LSval,IndexVals): tempsublist =  try: for i in indices: value = LSval[i] tempsublist.append(value) templist.append(tempsublist) ListVal.append(templist) # Assign your output to the OUT variable. OUT = ListVal
Here I left one script with the example prExample-Question.dyn (10.6 KB)