AnsweredAssumed Answered

delete rows in feature classes where some of the fields contain zero (0)

Question asked by ziziz on Feb 5, 2015
Latest reply on Feb 6, 2015 by ziziz

Hi,

 

So far I got this far:

 

import arcpy 

from arcpy import env 

env.workspace = r"C:\SouthA\Bolivia.gdb" 

 

listFCs = arcpy.ListFeatureClasses("*")

for fc in listFCs:

     rows = arcpy.UpdateCursor(fc, , , ["field1", "field2", "field6", "field7"])

     for row in rows:

          if row.getValue() == 0:

          rows.deleteRow(row)

 

 

The idea is that in each table select and delete the rows which have "0"s in either/or  field1, field2....

 

Thanks

Ert

Outcomes