The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
Multi-level sorting
20155127011
Member Posts: 1 Learner I
I have a table something like this:
Column A | Column B | Column C |
Jane Doe | A1 | 1 |
Jane Doe | B2 | 2 |
John Doe | A1 | 1 |
John Doe | A2 | 2 |
John Doe | B1 | 1 |
I need to sort this table firstly Column A then Column B then Column C. I can do this in Excel like this:
I tried to chain multiple sort operators but it didn't work.
0
Answers
Hi,
you could simply install the Jackhammer Extension from Marketplace and use the Advanced Sort operator which allows to specify multiple attributes. You don't need a license file for this particular operator.
Otherwise chain multiple Sort operators in inverse order of their significance. Least important one sort first, then the next, etc. But is much more ugly and also slower than a single Sort (Advanced) Operator of the Jackhammer.
Greetings,
Sebastian
If you are familiar with Python scripting in rapidminer, you can do achieve the operation in a single line of code.
Let's say you have this dataset,
and use use pandas sort_values function.
You will get the following result.
Check out the demo XML.
Harshit