Transpose in a sublist

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!

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.

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!

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

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.

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.

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

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

2 Likes

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.

2 Likes