2017-05-04 12 views
2

400.000件のデータセットがあります。問題は、時には1つのケースに対して約21,000個のダブレットがあることです。もう一つの問題は、私はダブルボックスを削除できないということです。なぜなら、どのケースがすべての情報で完結しているのかわからないからです。残念ながら、修正の日付はありません。だから私は情報が少ないダブテールをすべて削除するために最も多くの情報を持つケースを選択する可能性があるかどうかを知りたい。削除する右ダブレットを選択

ご協力いただきありがとうございます。

答えて

0

各行に欠けている/空のセルを数え、最小の空きセル数を持つ行を選択することをお勧めします。

*First creating some fake data for demonstration. 
*I'm constructing this so it contains a mixture of string and number variables. 

DATA LIST list/ID (f) Svar1 (a1) Nvar1(f) Svar2 (a1) Nvar2(f). 
begin data 
111,'a',1,'a',2 
111,p ,1,'b', 
111,'c',1, ,1 
222,'v',1, ,2 
222,'k',2,'x',2 
222,'n',,'z', 
end data. 

* note the separate treatment of string and number variables. 

count EmptyCells=Svar1 Svar2("") Nvar1 Nvar2 (sysmis). 
aggregate /outfile=* mode=addvariables /break=id /EmptyCells_min=min(EmptyCells). 

* variable EmptyCells now contains the count of empty cells in every row. 
* EmptyCells_min has the minimum number of empty cells in a row for every ID. 

select if EmptyCells_min=EmptyCells. 

を選択すると、IDごとに空でないセルの最大数を持つ行が残ります。 注 - 1つのIDに複数の行が残っている可能性があります。すべてが同じ数の空でないセルを含んでいます。それらの行の中から選択する方法や、それらを集約する方法を決める必要があります。

関連する問題