get the field information directly

13 views
Skip to first unread message

Mehdi Ravanbakhsh

unread,
Dec 23, 2015, 9:03:17 PM12/23/15
to Geospatial Python
Hi All,

I have a shape file with a field attribute called "class". Is there anyway I could use the name of the field to access its value? Thanks

Regards,
Mehdi

Praveen Kumar kokkerametla

unread,
Jan 20, 2019, 11:31:58 AM1/20/19
to Geospatial Python

Shp=Shapefile.getFeatures()
[i['class'] for i in shp]
Reply all
Reply to author
Forward
0 new messages