🥳 RAPIDMINER 9.9 IS OUT!!! 🥳

The updates in 9.9 power advanced use cases and offer productivity enhancements for users who prefer to code.

CLICK HERE TO DOWNLOAD

"[SOLVED] Transposing Data Loop"

rowan_growan_g Member Posts: 47 Contributor II
edited June 2019 in Help
Hi,

Another simple question - having trouble getting acquainted with all the functions - it's going to take some time.

I've got a list of text as follows:

x1
y1
z1
x2
y2
z2
x3
y3
z3

And I want to transpose it to the following:

x1 y1 z1
x2 y2 z2
x3 y3 z3


I've managed to calculate the amount of iterations successfully using macros but I'm struggling to get it moving through the list of values. I've tried using a loop with a nested transpose process but something is missing.

Any help would be much appreciated.

Thanks again!!

Cheers,
Rowan

Answers

  • venkateshvenkatesh Member Posts: 15 Contributor I
    What you need is "Pivot" operator. check out the documentation for the operator, there is an example process showing how to use it
  • rowan_growan_g Member Posts: 47 Contributor II
    Thanks for that. I've actually been trying the pivot operator. Doesn't seem to be grouping them correctly.
    I've managed to generate a "group" number, group 1,2&3 for each of the variables - still wont pivot.
    Could you perhaps post an example?

    Updated data:

    Id  Group   Att1
    1       1        x1
    2       1        y1
    3       1        z1
    4       2        x2
    5       2        y2
    6       2        z2
    7       3        x3
    8       3        y3
    9       3        z3


    Or would this be more correct:

    Id  Group  Att1
    1      1        x1
    2      2        y1
    3      3        z1
    4      1        x2
    5      2        y2
    6      3        z2
    7      1        x3
    8      2        y3
    9      3        z3


    Thanks.

    Cheers,

  • rowan_growan_g Member Posts: 47 Contributor II
    Solved - used aggregate operator, set aggregation attributes to concatenate.
    http://rapid-i.com/rapidforum/index.php/topic,6602.0.html
Sign In or Register to comment.