from numpy import * import arcpy rows = arcpy.SearchCursor("Z://Code//EX2_near.dbf","","","","") currentIN_FID = "IN_FID" currentNear_FID = "NEAR_FID" currentNear_Dist = "NEAR_DIST" newdata = [] # Iterate through the rows in the cursor for row in rows: rowN = [row.getValue(currentIN_FID), row.getValue(currentNear_FID), row.getValue(currentNear_Dist)] newdata.append (rowN) del row, rows #be sure to delete the cursor objects, otherwise a lock on the table will persist!!! print newdata datatwo = array([newdata])
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.