I am trying to move field entries down by 1 in an attribute table, between a certain row spread. I would like to move all the entries in the 'key biomechanical features' column down by 1 row between row x and row y ('Down' meaning the highlighted key biomechanical field entry in the image moving down to the field below it). I would like all the other columns to stay in their same place, and I would like the other entries in the 'key biomechanical features' column that are not in the row spread to stay in their respective location. enter image description here
Is there a way to do this using the field calculator and python?
Thank you in advance
Solved! Go to Solution.
Modify this and run it in the python window. Test on a copy!
prev_value = None
with arcpy.da.UpdateCursor("TableName", ["KeyBioMechanicalFeatures"]) as cursor:
for row in cursor:
this_value = row[0]
cursor.updateRow([prev_value])
prev_value = this_value
Modify this and run it in the python window. Test on a copy!
prev_value = None
with arcpy.da.UpdateCursor("TableName", ["KeyBioMechanicalFeatures"]) as cursor:
for row in cursor:
this_value = row[0]
cursor.updateRow([prev_value])
prev_value = this_value