HelloI need to get the data type of a specific field, example field "NAME", not all fields of the Feature Class as does ListFields or Describe.Thanks
import arcpy arcpy.env.workspace = "C:\GeoSpatialTraining\GISProgramming101\Exercises\Data" infc= "Streets.shp" fieln="FULL_STREE" field = arcpy.ListFields(infc,fieldn)[0] print field.type
ListFields takes a wildcard for the field name, passing in the field name should only return the single field.import arcpy arcpy.env.workspace = "C:\GeoSpatialTraining\GISProgramming101\Exercises\Data" infc= "Streets.shp" fieln="FULL_STREE" field = arcpy.ListFields(infc,fieldn)[0] print field.type
Just search for that field while looping through the feature classes and then perform a describe on that searched field.
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.