JSL, Remove duplicate rows by looking at another column condition.Hello again,
I am looking to remove duplicate rows by looking at another column condition.
I want JSL to remove the duplicate "Roi" rows when they appear in the same Date and keep only the latest row by time (on Date and time column) so the end result will be table with only rows 1,2,3,4 and rows 5 and 6 that appear with same date as row 4 but the time is earlier will be deleted.
| Row | Date and time | Name | Test Duration | Date |
| 1 | 8/23/20 6:12 PM | Roi | 85 | 8/23/2020 |
| 2 | 8/23/20 1:54 PM | Dan | 73 | 8/23/2020 |
| 3 | 8/23/20 9:21 AM | Robert | 76 | 8/23/2020 |
| 4 | 8/18/20 6:12 PM | Roi | 85 | 8/18/2020 |
| 5 | 8/18/20 4:57 PM | Roi | 160 | 8/18/2020 |
| 6 | 8/18/20 4:49 PM | Roi | 168 | 8/18/2020 |
Thanks in advance.
Advanced Statistical ModelingAutomation and ScriptingData Blending and CleanupMass CustomizationQuality and Process EngineeringSharing and Communicating ResultsRe: JSL, Remove duplicate rows by looking at another column condition.Here is a piece of JSL that will do what you want..
names default to here(1);
// Point to the data table
dt=current data table();
// The code below is going to sort the data into a possible different
// order, and by adding a columns that shows the original position
// the data can be sorted back to the original position at the end
dt<<NEW column=""></NEW>