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
"Group by Attributes" Parameter in "Aggregate" Operator is leading to some sorting problems
Hi everybody,
I was discretizing an Attribute "id_copy" so that the Attribute time has a sample rate of 1 second now.
Afterwards I used the "Aggregate" Operator for Averaging all Attributes except "id_copy" and grouping them by "id_copy".
This worked well for samling down and averaging the data but it lead to some sorting problems.
"id_copy" is sorted like 109, 11, 110, 111, 112 e.g.
The problem seems to be, that there should be some zeros as placeholders in "id_copy" and in "id" so they can be sorted like 009, 010, 011 e.g.
The "Sort" Operator for the Attribute "id_copy" in increasing direction didn´t change anything.
Can anybody help me with this issue?
Best
Ella
I was discretizing an Attribute "id_copy" so that the Attribute time has a sample rate of 1 second now.
Afterwards I used the "Aggregate" Operator for Averaging all Attributes except "id_copy" and grouping them by "id_copy".
This worked well for samling down and averaging the data but it lead to some sorting problems.
"id_copy" is sorted like 109, 11, 110, 111, 112 e.g.
The problem seems to be, that there should be some zeros as placeholders in "id_copy" and in "id" so they can be sorted like 009, 010, 011 e.g.
The "Sort" Operator for the Attribute "id_copy" in increasing direction didn´t change anything.
Can anybody help me with this issue?
Best
Ella
0
Best Answer
-
kayman Member Posts: 662 UnicornMost likely your id treated as a nominal and not as an integer, which is probably even intended as otherwise you wouldn't be able to use 009 and so. If you need to keep this trailing zeros you could create a copy of the id column, parse this as a number and apply the sort on this attribute. This will give proper numeric sorting.
The sorting you have now is perfectly normal from 'nominal point of view'.1
Answers