DataframesMeta track row number

When using each row, you can track row number as shown below

for (i, row) in enumerate( eachrow( test_df ) ) 
     # do something with row and i 
end

but how do I track the row number in each iteration when using DataFramesMeta @eachrow ?

Side note: you can also use rownumber(row) instead of doing enumerate.

1 Like

DataFramesMeta.jl introduces a variable into local scope called row which refers to the row number.

2 Likes