With the arcpy.da module, we cannot use the getValue method on the row object as we can in arcpy.SearchCursor:
We can, however, index over the columns for the row object:
I want to use the data access module because it cuts my processing time by almost a half. Indexing over columns on the row object doesn't really work for me because I am using this on an excel spreasheet where users may move columns around. I prefer to pull the heading name as I can with getValue. Is there a way to do this in the da module?
Thanks,
Mike
Code:
for row in arcpy.SearchCursor(fc):
row.getValue("SITE_ID")
Code:
with arcpy.da.SearchCursor(fc, "*") as cursor:
for row in cursor:
print row[1]
Thanks,
Mike