Good day everybody.
I am currently working with a file geodatabase. I created an additional field in a feature class table and want to add all the information from another field located in the same feature class table. I guess I can do it with arcpy.da.UpdateCursor but not sure how to copy from one field to another. Could you please give any advice?
Solved! Go to Solution.
Hi Mick,
This is pretty straight forward. Just include the two fields and set the source to the target:
with arcpy.da.UpdateCursor(fc, [sourceFld, targetFld]) as uCur:
for row in Ucur:
row[1] = row[0]
uCur.updateRow(row)
Hi Mick,
This is pretty straight forward. Just include the two fields and set the source to the target:
with arcpy.da.UpdateCursor(fc, [sourceFld, targetFld]) as uCur:
for row in Ucur:
row[1] = row[0]
uCur.updateRow(row)
You could also use Calculate Field to do something simple like this. You can even script creating the new field if you need!