I need to distribute the values, 0, 1, 2, 3 randoomly between those 250 rows filling ‘x’ column acording the proportionality en each column.
So, literaly I need to fill column ‘x’ with 125 registers with 0 value, 25 registers with value 1, 75 registers with value 2 and 25 registers filled with value 3.
Basically, what I do is 1) mizxing rows and then 2) assign 125 labels “1”, 25 labels “2”, etc. You can even use variables if you want (I haven’t).
If you are not interested in assigning exactly 125 rows to label “1”, you can make it even simpler and use a random label assigner (probability-based).
Thanks, this is what I need. But, is there a way to reference the first value of a column (for example 125 of column 0, 150 of column 1… in the data sample) in the rule engine node to do it dynamic, instead of a constant value like 125, 150, 225, 250 as yours?
I need it, because this table is in a loop and these values change each chunk.
Nice! But I have a problem with row rename. When transposed column to row, as I’m using a cuhunk loop, the column name is different every time and then the node “Right rename” doesn’t work.