Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Update all the odd rows in a field with the value in the row above.

$
0
0
I need to update a field where all of the even rows have a value and the odd row below needs that value assigned to it as well.
This needs to become This
1 - 1
0 - 1
2 - 2
0 - 2
1 - 1
0 - 1

I ideally would like to run the code as a calculate field within model builder.

For more information every two rows has the same ID. For example the first 2 rows have ID A the next two, B. I don't know if this would help solving those second values or not.

Viewing all articles
Browse latest Browse all 2485

Trending Articles