Transpose in a sublist


#1

Hello,
I am trying to transpose in a sublist but its not working. I am trying to associate the string with the percentage of times it appears in a given sublist. Which I was successful at doing, however, now I am trying to pair that percentage with the original string it belongs to but it always appears in a separate sublist no matter how I use the transpose level structure. Does anybody see what I am missing? Thanks!


#2

Looks like lacing/levels, or perhaps just add a flatten node on the end with longest lacing. Need to see more of the data to know.


#3

Do you mean like this? See below. The problem with this is that each of the data pairs are not in their own data sublist. This has them in a sublist together, but they are jumbled in there with data pairs from other elements. How much more data would you like to see? is this enough?
Thanks again!


#4

It sounds to me like the flatten node is what you’re after. What should the end list look like?


#5

I am trying to pair each line number such as 6N1-149 with the percentage of times it occurs such as 90.9% it their own independent sublists.


#6

Not what I had thought at all. Sorry for sending you on a goose chase.

String.Split(A + “ - “ B, “ - “)

Where A is the list of items and B is the percentage.

You could also flatten the initial lists completely and then pair them up there.


#7

how do you put a list in for those variables in which you indicate please?


#8

As I had them they should work. You may need to play with the levels (@-X<1>) though.


#9


#10

hi @mix,

it seems to me that adding another List.Transpose at the end of your script would resolve your problems. Just use the proper levels to do it.