I am currently working with a database that hold street names, x and y coordinates and many more fields. I would like, through a search cursor, to store the x,y coordinates in a separate list for every street name (unique string).
For example, I have 23 entries under Washington street (with 23 x and 23 y coordinates). I would like to find a way to create a list named washington and store the coordinates in that list, and do that for every single street in my database inside a for loop.
For now, all I got is 1 big list with all the data :
spatialjoin = arcpy.env.workspace + '\SpatialJoin_test.shp'
coord=[]
cursor=arcpy.da.SearchCursor(spatialjoin, ['Road_Name','X','Y'])
for row in cursor:
print(row)
coord.append(row)