Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Cursors are used by database programmers to process individual rows returned by database system queries.
3
votes
1
answer
157
views
Insert Cursor Having an Issue With Reading the Syntax of a List
NFID's are accounted
cursor = arcpy.da.InsertCursor(shp_report, ['SITE_NFID'])
for item in dashboard_site_summary_list:
cursor.insertRow(item)
Current output in the "dashboard_site_summary_list" … :
for row in cursor:
if row[0] not in nfa_dict:
dashboard_site_summary_list.append('((' + str(row[0]) + ',),') …
1
vote
3
answers
795
views
Using ArcPy to ListFields inside SearchCursor?
featureClass = '\\\\Bvweb104draco\\e\\03_MapServices\\SDE_CONNECTIONS\\bvcolumbusdev.sde\\bvcolumbusdev.sde.Telecom\\bvcolumbusdev.sde.AREAS'
with arcpy.da.SearchCursor(featureClass, str(fields)) as cursor … :
for field in fields:
if row[0] is not None:
print(field.name)
I want the cursor to loop through each field and if it stumbles upon a row that has a value other than NULL, print …
1
vote
3
answers
1k
views
Search Cursor Return Field Name If All Rows Contain a Value
fiberCable = r'Orlando\Orlando_FIM_prep\FIBERCABLE'
list = []
with arcpy.da.SearchCursor(fiberCable, "inventory_status_code") as cursor:
for row in cursor:
if row[0] is not None: … str(row[0]))
Using the logic on the table above it prints out this list:
['Preliminary Designed', 'DesignComplete', 'DesignComplete', 'DesignComplete', 'DesignComplete']
How do I get the search cursor …
0
votes
2
answers
429
views
Arcpy UpdateCursor not Updating, but no Error Reported
:
for row in cursor:
fqnList.append(row)
for fqn in fqnList:
arcpy.AddMessage(fqn)
# Update "bv_asbuilt_gdb_uploaded" field in SDE feature classes
for fc in sdefcList:
with arcpy.da.UpdateCursor … (fc, ["bv_fqn_id", "bv_asbuilt_gdb_uploaded"]) as cursor:
for row in cursor:
if row[0] in fqnList:
row[1] = "Y"
else:
row[1] = "N"
cursor.updateRow …
0
votes
Accepted
Arcpy UpdateCursor not Updating, but no Error Reported
fcList = [transmedia, structure, spliceClosure, span, equipment, buildingfootPrint, attachment]
sdefcList = [spliceClosure1, buildingfootPrint1, fiberEquipment1, conduit1, structure1, fiberCable1]
I …
0
votes
2
answers
1k
views
Populating a Dictionary with an Update Cursor "Typeerror: 'Dict' Object Is Not Callable"
fdaAREA = 'C:\\Users\\bro81520\\Documents\\ArcGIS\\Default.gdb\\FDA_AREA'
d = dict() # VENDOR_WO_ID : NFID
fields1 = ['VENDOR_WO_ID', 'NFID', 'ISFDA']
with arcpy.da.SearchCursor(pld3GDB, fields1) as cursor … , fields2) as cursor:
for row in cursor:
if row[0] in d:
row[1] = d[row[0]]
cursor.updateRow(row)
I've looked at the following resources, but haven't deciphered …
0
votes
Using ArcPy to ListFields inside SearchCursor?
This seems to work, but it vastly beyond my current understanding of Python.
fc = '\\\\Bvweb104draco\\e\\03_MapServices\\SDE_CONNECTIONS\\bvcolumbusdev.sde\\bvcolumbusdev.sde.Telecom\\bvcolumbusdev. …
0
votes
1
answer
270
views
Comparing Two Tables Using Arcpy
The code I'm using below takes the values from the "fiberEquipment" table, inserts them into a dictionary and than uses a search cursor invoking the dictionary elements to check for discrepancies. … row in cursor:
if ipc[str(row[1])] == row[1]:
objectID.append(ipcOID[row[0]]) …
0
votes
2
answers
596
views
Switching from Nested Search Cursors to Dictionaries
:
for row in cursor:
asegkey = row[0]
zsegkey = row[1]
asibid = row[2]
zfibid = row[3]
with arcpy.da.UpdateCursor(sdeFiberSplice, sdeFiberSpliceFields) as cursor … :
for row in cursor:
if asegkey == row[0] and zsegkey == row[1] and asibid == row[2] and zfibid == row[3]:
print asegkey
row[4] = "Y" …
-1
votes
1
answer
748
views
Search Cursor Cannot open Feature Class [closed]
bro81520\\Documents\\ArcGIS\\PLDV3_SPC_ODN_315_25Sep.gdb\\PLDV3_SPC_ODN_315_25Sep.gdb\\WO_HIERARCHY'
list = []
fields = ['VENDOR_WO_ID', 'NFID', 'ISFDA']
with arcpy.da.SearchCursor(pld3GDB, fields) as cursor … :
for row in cursor:
if row[2] == "Y":
print(row[1])
del cursor
I'm trying to run a SearchCursor on the feature classed titled "pld3GDB', but it keeps giving me the following error:
Runtime …