Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import arcpy
- fc = "C:/Work/VitalSigns/ARCN-CAKN Dall Sheep/Data/LegacySurveyUnits/ARCN_Subunits_Sheep_WGS84.shp"
- fieldsList = arcpy.ListFields(fc) #get the fields
- fields = [] # create an empty list
- # loop through the fields and add the columns to the list, change the Shape column (containing geometry) into a token,
- for field in fieldsList:
- if field.name == "Shape":
- fields.append("Shape@")
- else:
- fields.append(field.name)
- # loop through the fields and output them
- i = 0
- for field in fieldsList:
- print field.name + " = row[" + str(i) + "]"
- i = i + 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement