
你好,
上面的表格只是我的数据集的一个示例。我有 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;
对于您提供数据表图像的未来讨论,请将其作为表格插入,而不是作为表格的图片,或者如果可能的话附上表格。这将消除响应者必须花费时间来单独创建表的要求。