
你好,
上面的表格只是我的資料集的一個範例。我有 10 萬行和 500 多列。我的問題是如何刪除“aaa”行
我不確定您希望最終結果是什麼。如果您希望結果表為:

Names Default To Here( 1 );
dt = Current Data Table();
// Get all of the column names
colNameList = dt << get column names( string );
// Remove the first column name from the list
Remove From( colNameList, 1, 1 );
dt << Begin Data Update;
// Loop across all columns in the list and recode them
For( i = 1, i <= N Items( colNameList ), i++,
dt << Recode Column(
As Column( dt, colNameList[i] ),
{Map Value( _rcOrig, {"aaa", " "}, Unmatched( _rcNow ) )},
Update Properties( 1 ),
Target Column( As Column( dt, colNameList[i] ) )
)
);
dt << End Data Update;
如果最終結果是

Names Default To Here( 1 );
dt = Current Data Table();
// Get all of the column names
colNameList = dt << get column names( string );
// Remove the first column name from the list
Remove From( colNameList, 1, 1 );
// Loop across all columns in the list and find rows
// that have aaa for that column
For( i = 1, i <= N Items( colNameList ), i++,
dt << select where(
As Column( dt, colNameList[i] ) == "aaa",
current selection( "extend" )
)
);
// Delete all selected rows
dt << delete rows;
對於您提供數據表圖像的未來討論,請將其作為表格插入,而不是作為表格的圖片,或者如果可能的話附上表格。這將消除響應者必須花費時間來單獨創建表的要求。