Wednesday 31 January 2018

arcpy - string u' encoding problem


the goal of my program is to retrieve data from a field one after another at the end to compare with other values of another table when I execute the code that allows me to point to the values of the first field I get a string that starts with u ' What should I do to remove the u'


DataSource= Shapefile


cursor=arcpy.da.SearchCursor("Feuil1$","LIAISON_NOM")

for row in cursor:
print(str(row))

i get this


>>>>(u'ROAD 1',)
(u'ROAD 2',)


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...