Summary
Returns a dictionary with multiple properties, such as data type, fields, indexes, and many others. The dictionary's keys are dynamic, meaning that depending on what data type is described, different properties will be available for use.
Describe keys are organized into a series of property groups. Any particular dataset will acquire the properties of at least one of these groups. For instance, if describing a geodatabase feature class, you could access properties from the Geodatabase Feature Class, Feature Class, Table, and Dataset property groups. All data, regardless of the data type, will always acquire the generic Describe object properties.
Discussion
Many data types include properties from other property groups. For instance, if describing a geodatabase feature class, you could access properties from the Geodatabase Feature Class, Feature Class, Table, and Dataset property groups.
- Describe object properties
- ArcInfo Workstation Item properties
- ArcInfo Workstation Table properties
- Attribute Rule properties
- BIM File Workspace properties
- CAD Drawing Dataset properties
- CAD Feature Class properties
- Coverage Feature Class properties
- Coverage properties
- Dataset properties
- dBASE Table properties
- Editor Tracking properties
- Feature Class properties
- Field group properties
- File properties
- Folder properties
- Geodatabase Feature Class properties
- Geodatabase Table properties
- Geometric Network properties
- Geostatistical Layer properties
- LAS Dataset properties
- Layer properties
- Location Referencing Dataset properties
- Map Document properties
- Mosaic Dataset properties
- Network Analyst Layer properties
- Network Dataset properties
- Parcel Fabric properties
- Parcel Fabric For ArcMap properties
- Projection File properties
- Raster Band properties
- Raster Catalog properties
- Raster Dataset properties
- Record Set and Feature Set properties
- Relationship Class properties
- Representation Class properties
- Schematic Dataset properties
- Schematic Diagram properties
- Schematic Folder properties
- SDC Feature Class properties
- Shapefile Feature Class properties
- Table properties
- Table View properties
- Text File properties
- Tin properties
- Tool properties
- Toolbox properties
- Topology properties
- Trace Network properties
- Utility Network properties
- VPF Coverage properties
- VPF Feature Class properties
- VPF Table properties
- Workspace properties
Syntax
Describe (value, {datatype})
Parameter | Explanation | Data Type |
value | The specified data element or geoprocessing object to describe. | String |
datatype | The type of data. This is only necessary when naming conflicts exists, for example, if a geodatabase contains a feature dataset (FeatureDataset) and a feature class (FeatureClass) with the same name. In this case, the data type is used to clarify which dataset you want to describe. (The default value is None) | String |
Data Type | Explanation |
Dictionary | Returns a dictionary with keys detailing the data element described. |
Code sample
Access a specific property using the key value.
import arcpy
path = "C:\\Data\\Venice.gdb\\VeniceStructures"
desc = arcpy.da.Describe(path)
field_names = [field.name for field in desc["fields"]]
if "YEAR_BUILT" not in field_names:
arcpy.management.AddField(path, "YEAR_BUILT", "SHORT")
Display the returned Describe dictionary to look at all available properties.
import arcpy
from pprint import pprint
path = "C:\\Data\\Venice.gdb\\VeniceStructures"
desc = arcpy.da.Describe(path)
pprint(desc)