3

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?

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Dec 5, 2013 at 19:53

1 Answer 1

10

Use arcpy.Describe.

fieldcount = len(arcpy.Describe(featureClass).fields)
answered Dec 5, 2013 at 19:57
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.