🥳 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

combining multiple columns into single column

AnushaAnusha Member Posts: 5 Contributor II
Hello Everyone,

I'm trying to combine the necessary columns with a delimiter as "," into a single column, but I'm unable to do that. can anyone please help me?

eg: input data: no of columns=5
reg no      text1      text2     text3         text4
1               an         apple     keeps       away
2               The        sun       rises         in

required output: no of columns=2

reg no       full text
1               an, apple, keeps, away
2                The, sun, rises, in


Thanks in Advance!

Best Answer

  • kaymankayman Member Posts: 613   Unicorn
    edited April 6 Solution Accepted
    @Anusha, Try as with attached. The aggregate operator contains a 'hidden' concatenation option which does exactly what you want.
    It's comma separated now, but you can easily change the comma to |: or whatever you prefer.
    Anusha

Answers

  • kaymankayman Member Posts: 613   Unicorn
    The aggregate operator allows you to concatenate multiple columns, seperated by any token you like. 
  • AnushaAnusha Member Posts: 5 Contributor II
    @kayman, aggregator combines row values but my requirement is combining column values to form a single column. by the way, can you please show, In aggregator where can we change the concatenation separator, the default one "|" but I want to change that to "|:", is it possible?
  • Telcontar120Telcontar120 Moderator, RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,625   Unicorn
    @Anusha I think the operator you want for this is Generate Concatenation.
    This combines values from separate attributes into a single attribute, and you can also specify the separator character(s) you want to use between them.

    Brian T.
    Lindon Ventures 
    Data Science Consulting from Certified RapidMiner Experts
Sign In or Register to comment.