JSL,通过查看另一列条件删除重复行。再一次问好,
我希望通过查看另一列条件来删除重复的行。
我希望 JSL 在重复的“Roi”行出现在同一日期时删除它们,并按时间(在日期和时间列上)仅保留最新的行,因此最终结果将是仅包含第 1、2、3、4 行的表格与第 4 行出现相同日期但时间较早的第 5 行和第 6 行将被删除。
| 排 | 日期和时间 | 姓名 | 测试时间 | 日期 |
| 1个 | 20 年 8 月 23 日下午 6:12 | 投资回报率 | 85 | 8/23/2020 |
| 2个 | 20 年 8 月 23 日下午 1:54 | 担 | 73 | 8/23/2020 |
| 3个 | 8/23/20 上午 9:21 | 罗伯特 | 76 | 8/23/2020 |
| 4个 | 20 年 8 月 18 日下午 6:12 | 投资回报率 | 85 | 8/18/2020 |
| 5个 | 8/18/20 下午 4:57 | 投资回报率 | 160 | 8/18/2020 |
| 6个 | 20 年 8 月 18 日下午 4:49 | 投资回报率 | 168 | 8/18/2020 |
提前致谢。
脚本回复:JSL,通过查看另一列条件删除重复行。这是一段 JSL,可以做你想做的事。
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>