I've been looking at the ArcGIS resources for python but I can't seem to figure this one out.
I'm looking for a method to gain access to the number of fields that are within a shapefile / feature class. Is this information available via Python?

1 Answer 1


Use arcpy.Describe.

fieldcount = len(arcpy.Describe(featureClass).fields)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.