"[SOLVED] How to swap attributes/column order for Excel output?"
hello,
after a few intensive days deep into Rapidminer i managed to solve almost any complicated problem i had (xPath, crawl, filter, date format, regex, etc. thanks to this forum) but this simple one!
I am reading Excel files where the order of columns is : teaser / URL / title / time
I simply want to change this order into: time / title / teaser / URL
In the "Read Excel" operator, i tried to modify the "column index" values for the different attributes (ie. 0 for time, 3 for URL). No effect
I tried to change "attribute" to "label", "id", "weight"...No effect too.
I surely missed something somewhere...
任何帮助都是赞赏!
Alex
after a few intensive days deep into Rapidminer i managed to solve almost any complicated problem i had (xPath, crawl, filter, date format, regex, etc. thanks to this forum) but this simple one!
I am reading Excel files where the order of columns is : teaser / URL / title / time
I simply want to change this order into: time / title / teaser / URL
In the "Read Excel" operator, i tried to modify the "column index" values for the different attributes (ie. 0 for time, 3 for URL). No effect
I tried to change "attribute" to "label", "id", "weight"...No effect too.
I surely missed something somewhere...
任何帮助都是赞赏!
Alex
Tagged:
0
Best Answer
-
scepxko MemberPosts:15MavenHello Dietrich,
Thank you for your help. It worked perfectly.
Below is the process that works for me.
Thank you again!
Alex
< portSpacing端口= " sink_through 1”间隔= " 0 " / >
< portSpacing端口= " sink_through 1”间隔= " 0 " / >
< portSpacing端口= " sink_through 1”间隔= " 0 " / >0
Answers
unfortunately at this time there is no special operator to put the columns/attributes in a specific order. There already is a feature request for this (#985 in Bugzilla). Let's see how that goes eventually.
As a workaround you could you use two "Work on Subset" operators to get this done. You can use it to pick a single attribute which is then made the leftmost column. In your case you would first pick "title" and then "time".
1. Drop the operator "Work on Subset" on your process
2. Double-click to open.
3. Connect the two example ports and move up to exit the operator
4. Set parameters: attribute filter type = single, attribute = title
5. Drop another "Work on Subset" behind the first one, attribute = time
Let me know if that gets it done.
Dietrich