I make a new column in my attribute table and it has a default value (for example 0). I want to (probably using the Field Calculator) have the result that row 1 has the value 1, row 2=2 and so on, just like a numbered index.
I'd be thankful for a code example for the field calculator (including the use of $rownum
(I think I need this for switching to the line)).