Learning Python for ArcMap

310
1
11-21-2018 01:21 PM
RyanPhillips2
New Contributor

Hello, I am looking to  delete a specific rows from an attribute table that have specific names. I thought I could possibly use the arcpy. da.UpdateCurser function and end it with Delete Row, that is not working for me. This is what I am using, I am getting a parsing error on line 3.

>>> with arcpy.da.UpdateCursor("Export_Output", ["ZONE_SUBTY"]) as row:
... for row in row:
... if row in "AREA OF MINIMAL FLOOD HAZARD"
... row.deleteRow(row)

Thank you so much! 

0 Kudos
1 Reply
DanPatterson_Retired
MVP Emeritus

maybe

if row[1] == "AREA OF MINIMAL FLOOD HAZARD":  # don't forget the colon at the end of the line

0 Kudos