FieldNames = [f.Name for f in arcpy.ListFields(tbl)] # field name strings in a list Rows = arcpy.UpdateCursor(tbl) for Row in Rows: for f in FieldNames: print f, str(Row.GetValue(f))
Alternatively, the ListFields and ListIndexes functions can be used to create the same lists.
FieldObjects = arcpy.Describe(tbl).Fields FieldNames = [f.Name for f in FieldObjects] # field name strings in a list Rows = arcpy.UpdateCursor(tbl) for Row in Rows: for f in FieldNames: print f, str(Row.GetValue(f)) print
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.