刪除列中的特定行
我想刪除以「00097」開頭的行怎麼辦?
謝謝

進階統計建模資料混合與清理回复:刪除列中的特定行謝謝 !
回复:刪除列中的特定行謝謝 !
回复:刪除列中的特定行太感謝了
回复:刪除列中的特定行如果您不想使用 JSL 來解決問題,那麼公式列可能會有所幫助。
相近@txnelson解決方案,創建一個新列,並將此公式粘貼到其中。
Left( :Order Number, 5 )
然後在您的數據表中,單擊具有 00097 的一行以將其選中,然後使用右鍵單擊選項選擇匹配行。
選擇它們後,您可以刪除這些行,或右鍵單擊以排除/隱藏它們,以便保留所有原始數據。
回复:刪除列中的特定行這是另一種選擇,使用 get rows where() 結合 starts with() 將行放入矩陣,然後使用 delete rows() 刪除它們。
下面的腳本將刪除大類數據表中所有以“J”開頭的名稱:
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
rows_to_delete = dt << Get Rows Where(Starts With(:name, "J"));
If(N Items(rows_to_delete),
dt << Delete Rows(rows_to_delete);
show(rows_to_delete);
);
回复:刪除列中的特定行Names Default To Here( 1 );
dt = Current Data Table();
// Select the rows that meet the qualification
dt << select where( Left( :Order Number, 5 ) == "00097" );
// delete the selected rows. Using the Try() function keeps
// the deletion from failing if no rows were selected
Try( dt << delete rows );