I am new to python and am trying to get a string field in a geodatabase table to split and create a new row. Here is the code based on the solution from Splitting strings into new rows, retaining geometry:
import arcpy
inputTable="PathtoTable/XYZ.mdb/EasementsScratchSelectedRecords"
inputTableAgain="PathtoTable/XYZ.mdb/EasementsScratchSelectedRecords"
searchC = arcpy.da.SearchCursor(inputTable, ("OBJECTID","DocumentNameorNumber","SecondaryIdentifier"))
insertC = arcpy.da.InsertCursor(inputTableAgain, ("OBJECTID","DocumentNameorNumber","SecondaryIdentifier"))
for row in searchC:
A = [x.split('Point') for x in row[:-1] ]
for i in range(min(len(A[0]),len(A[1]),len(A[2]))):
newRow = [A[0][i] , A[1][i], A[2][i], row[3]]
insertC.insertRow(newRow)
del insertC
I keep getting the following error:
line 17, in A = [str(x.split('Point')) for x in row[:-1] ] AttributeError: 'int' object has no attribute 'split'