在下面的代码中,我想删除列cd,id,se,nt,dd中的重复项。通常,当出现重复项时,首先出现在NT列中,带有“ - ”。但总的来说,它们在所有列中都是重复的。提前谢谢!
console.log('starts');
setTimeout(function(){
console.log('set timeout called');
}, 100);
// something similar like this
process.on('async', function(){
console.log('current execution context finished. event loop going to
execute the next one!');
}
答案 0 :(得分:2)
您可以在proc sort
之前添加print
nodupkey
选项,以删除所有重复项:
proc sort data=data.data2 nodupkey;
by cd id se nt dd;
run;
或者,如果您想保留原始数据,可以将proc sort
的结果输出到新表:
proc sort data=data.data2 out=data3 nodupkey;
by cd id se nt dd;
run;
PROC PRINT DATA=data3;
var cd id SE NT DD;
format notional commax32.;
run;