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>