Data Management - Lists


#1

Hi All,

Hoping to get some help with Data management in a project I’m currently undertaking.

I have 4 data sources of points and each data source is split into multiple Lists. Each of the sources have equal amounts of points in each list, however each list varies in sizes from 3 points to 11points. There is going to be approximately 600-700 lists per Point source.

C01

 

 

 

Is there a way to combine the lists together so that for example the new List [5] will be made up of 3 Sub-lists with 4 points in each sub-list.

Hopefully this makes sense.

Thanks.

 

 


#2

Simply flatten the list and then use Sublists with range of 0 to 3 und offset 4. The same can be achieved using a codeblock like this: “List.Sublists( List.Flatten(list, 1), {0…3}, 4);”.

Hope that does the job. Fabian

Sublist


#3

index-list

danny, don’t know if i understood right.

you have 4 lists and want to combine them like:

1(1), 2(1), 3(1),4(1)

and the list hold sublists of irregular length

i would suggest this handy python node


#4

Thanks Fabian, however the range of each Sub-list in the entire list can range from 3-11 points per Sub-List. So I can’t restrict it to only a range of 3.

Thanks Peter, I can’t seem to see the screenshot clearly, would you be able to upload a larger screenshot.

Appreciate the feedback!

Just to clarify a bit further. In the image below, shows the resultant list I want for Sub-List [5] from the Point Sources.

C02

 


#5

oh sorry, again the pics:

 

python


#6

Thanks Peter, much appreciated!