- I have a list of number repeated a random number of time
- with each number comes a text data (Exclus)
- I want to replace each value but the last associated with each number and get that list of value back to original order.
I got the first part done with a group by key, but to get the correct output I would need to “reverse” that group by key operation. _ or maybe there is another way to approach the problem
How do I do that?
My proof of concept below
allButLastProblem.dyn (44.5 KB)
Sorry I did it using an Imperative block (@kennyb6 would kill me), but this is beacuse List.ReplaceItemAtIndex is not working as expected.
I still think that using Python would be the easiest way, but I thought that it is more visual and comprehensible that way.
allButLastProblem.dyn (25.7 KB)
@mellouze I was trying something as well, with a different approach, so I post it anyway.
List.ReplaceItemAtIndex works for only one index, you need to use the node in the Clockwork package
Thank you guy,
You got it nailed in no time. This is part of a much bigger script and that was a bit out of my comfort zone.
Sorry I cannot mark your solution as well @lucamanzoni