I am trying to calculate the sum in each field in my list:
Cost_Adders = ["RR_CROSSING", "INTERSTATE", "RIVER"]
for Cost in Cost_Adders:
where = f"Cost_Adders = {Cost}"
CostAdder_count = sum([row[0] for row in arcpy.da.SearchCursor(Layer, Cost_Adders, where = f"Cost_Adders = {Cost}")])
arcpy.AddMessage(f"{Cost} Layer: {CostAdder_count}")
but receive the error below:
TypeError: 'where' is an invalid keyword argument for this function
Is this due to a bad where clause?
where, the parameter is namedsql_clause– bixb0012 Mar 08 '23 at 14:59