Skip to main content

Data-Filtering

Command Description

Use an expression to filter data from a datatable

Command Prototype

objDatatable = Datatable.QueryDataTable(dtTable,strQueryExpress)

Parameter Description

ParameterRequiredTypeDefaultDescription
dtTableTrueexpressionobjDatatableThe data table to be filtered
strQueryExpressTruestring""The conditions used to filter data, for example: "column.str.contains('Laiye RPA') and column1>1" means data in the lines whose 'column' contains 'Laiye RPA' and 'column1' is larger than 1

return

objDatatable,The variable used to save the output of the command.

Demo

aryData = [["a", 1], ["b", 2], ["c", 3]] 
aryColumns = ["letter", "number"]
objDatatable = Datatable.BuildDataTable(aryData,aryColumns)
objDatatable = Datatable.QueryDataTable(objDatatable,"number>1")
TracePrint(objDatatable)
/*
letter number
1 b 2
2 c 3
*/