Quantcast
Channel: Question and Answer » arcmap
Viewing all articles
Browse latest Browse all 248

In ArcPy, How to call specific columns of attribute table?

$
0
0

I’m trying to figure out how to spline specific columns of a shapefile attribute table, but my question is intermediate to this– how do I select a range of columns, e.g. the 20th column to the right-most column, as fields to apply a for loop operation to? My first thought was to try numpy, but I’m open to ideas. For now I’d just like to either print the names of the desired columns or specify the columns to be iterated in the for loop line. Thanks!

import arcpy, numpy as np
from arcpy.sa import *

fieldList = arcpy.ListFields(r"C:UsersafullharDesktopLab6Data For Lab on habitat modelingLayersstart_data10_km_Points.shp")

for field in fieldList:
    print format(field.name[19,:])

Viewing all articles
Browse latest Browse all 248

Trending Articles