dataFrame.rows — forEach()
Description
The forEach() method of the rows object executes the specified function once for each row of the DataFrame.
Signature
dataFrame.rows.filter(function)Argument
function(function)- A function to execute for each row. The function receives a
rowobject representing the current row. Column values can be accessed using column names:row["name"]row["age"]
Example
// log rows where value in the column 'age' is greater than or equal to 18
dataFrame.rows.forEach(function(row) {
if (row["age"] >= 18) {
notebook.log(row);
}
});