AnsweredAssumed Answered

arcpy.da.UpdateCursor to concatenate two strings

Question asked by clintoncooper on Oct 21, 2013
Latest reply on Oct 22, 2013 by clintoncooper
I am trying to figure out how to concatenate two strings using the arcpy.da.UpdateCursor method (newbie to python scripting).  I have tried many trial and error attempts in the basic code from resource center, and have yet to get one that will work.  Here is the code I am working with:

import arcpy  fc = " C:\Users\cc1\Desktop\Metro_Bus_Stops.shp" fields = ('City','TRIAL')   with arcpy.da.UpdateCursor(fc, fields) as cursor:  in cursor:         row[0] = row[1]         cursor.updateRow(row)  


This code works fine for updating a new field with the current data form another field.  But I cannot get it to concatenate two fields together for the new third field.  Also, I have seen some literature with the ''.join() method, that I am interested in.  I am working with over 7 million records, and every once of performance I can gain is needed.

Outcomes