The following script is taken to field values from an attribute table and printing a string. My problems is that the first field (SpringName) is all uppercase and I need it to only be capitalized. Any and all help is greatly appreciated
import arcpy
from arcpy import env
env.workspace = "C:/Users/morganp/Documents/NOTES/msu/LM_9/Lab9data/gaswell_L9.gdb"
fc = "Springs"
fields = ["SpringName", "Cnty_name"]
with arcpy.da.SearchCursor(fc, fields) as cursor:
for row in cursor:
print(u'{0}Spring is located in {1} County'.format(row[0], row[1]))
Solved! Go to Solution.
Try row[0].title() In your format line.
Try row[0].title() In your format line.
Thank you very much, that fixed it