February 19th, 2013, 11:29 AM
Printing the different values from a database field
I am relatively new to python but have worked with file and personal geodatabases in the ESRI environment for several years, and now Im trying to combine the two. I have a database that contains 72 features or rows. One of the fields (FACILITY_ID2) is populated with one of three different values. I have used a for loop to print out all the values from this field, but is there a way to just print the different values... meaning my result would have three lines, one example of each of the different values in the field?
heres the simple code I have so far:
fc = arcpy.SearchCursor("FACILITY_ENERGY", "", "", "FACILITY_ID2", "")
for values in fc:
February 19th, 2013, 02:26 PM
Try the set data type.
[/code] are essential for python code and Makefiles!