It does not. It just simply runs an update cursor calculation on a dataset updating a bunch of fields.
here is my script:
import arcpy, collections
fc = r"E:\MATCH_WARD"
fields = ('AMOUNT','PARTY_IDEOLOGY','UNK','REP','DEM','CONT_DEM_NUM','CONT_REP_NUM','CONT_UNK_NUM')
with arcpy.da.UpdateCursor(fc, fields) as cursor:
for row in cursor:
if row[1] == "UNK":
row[2]=row[0]
row[7]=1
else:
row[2]=0
row[7]=0
if row[1] == "REP":
row[3]=row[0]
row[6]=1
else:
row[3]=0
row[6]=0
if row[1] == "DEM":
row[4]=row[0]
row[5]=1
else:
row[4]=0
row[5]=0
cursor.updateRow(row)
del row
del cursor