I am working with Python 2.7 and ArcPy under Jupyter notebook environment. I would like to adapt iteratively my code to a reference table.
This is my reference table which contains the 3 variables that I use for the tool I am running in ArcPy:
RegY HunCal CRY
1 1718 BL1
1 1112 JU1
1 1112 JU1
1 1213 JU1
This is a simple XLS table which I imported to my Jupyter notebook. I have it as a visual reference for when I have to change these variables in my code.
In the beginning, I was doing it by hand because they were a few changes to make. But now there are more than 150 changes to adapt, and, this amount increases with time. Therefore, I would like to modify the code in such a way that it uses the reference table to iterate through every feature each time the reference table changes.
This is the code I am using:
# 2011
# Set geoprocessor object property to overwrite existing output
arcpy.gp.overwriteOutput = True
arcpy.env.workspace = r'C:\Users\GeoData\simSear\SBA_D.gdb'
# Process: Group Similar Features
SS.SimilaritySearch("redD_RegY_1_1112","blackD_CRY_JU1_1112","SS_JU1_1112","NO_COLLAPSE",
"MOST_SIMILAR","ATTRIBUTE_PROFILES",0,
"Temperatur;Precipitat", 'DateFin')
How can I adapt the code in such a way that the variables from the reference table are inserted into my code in the following way?
From the reference table, the values from RegY would be replaced in redD_RegY_**1**_1112. The values from CRY would be replaced in blackD_CRY_**JU1**_1112 and SS_**JU1**_1112 and finally, the values from HunCal would be replaced in redD_RegY_1_**1112**, blackD_CRY_JU1_**1112**,SS_JU1_**1112**.
