Hi, I would like to have this code remove and XY or RR (if they are the first 2 characters) in a field with values
XY2365541
RR1247884
8965445
would be:
2365541
1247884
8965445
Writing a query is giving me trouble. I was trying this code with a search cursor, getvalue and if elif statement...but no luck
XY2365541
RR1247884
8965445
would be:
2365541
1247884
8965445
Writing a query is giving me trouble. I was trying this code with a search cursor, getvalue and if elif statement...but no luck
Code:
import arcpy
Feature_Class_Name = arcpy.GetParameterAsText(0)
Output_Features = arcpy.GetParameterAsText(1)
arcpy.env.workspace = r"H:/TestMDB.gdb/XY_1"
cursor = arcpy.da.UpdateCursor(Feature_Class_Name, ["NM"])
for row in cursor:
cursor.updateRow([row[0][2:]])
del fc