I created a table with three fields but there are no values in these fields. Here is the screenshot of these fields.
I want to add a new row with zeros for all these three fields. Here is my code.
with arcpy.da.UpdateCursor(selectionname,("OBJECTID","FREQUENCY","SUM_Shape_Area")) as cursor:
for row in cursor:
if row[0] == None:
row[0] = 0
cursor.updateRow(row)
else:
print selectionname + " is not empty"
Selectionname is my table, a parameter defined prior to this part of my code. First, I need to check if these three fields are empty, then adding a new row with zeros if they are empty. After several tries, I still could not add a new row to the table.