I am writing a python script which duplicates a field. The field contains names of pipelines but some of these names has double quotation (ex. 8" NGL PIPELINE). I have created a new field and trying to copy the attributes using:
arcpy.CalculateField_management(PL_XING_SUMMARY,"PLNAME", "'!FIRST_PLNA!'", "PYTHON_9.3");
But the script double quotes whole attributes (ex. "8" NGL PIPELINE"). Is there a way to remove the double quotation marks at the start and end of each attribute?
P.S. I am using ArcGIS version 10.1 Service Pack 5
1 Answer 1
Wouldn't getting rid of the extra quotes work? That is:
arcpy.CalculateField_management(PL_XING_SUMMARY,"PLNAME", '!FIRST_PLNA!', "PYTHON_9.3");
-
@user20688 I just ran same test using your string at ArcGIS 10.2 and it worked fine for me too. As an aside there is no SP5 for 10.1 so I am thinking you must be using ArcGIS Desktop 10.0 SP5 and have adjusted your tags accordingly.2013年08月01日 22:52:37 +00:00Commented Aug 1, 2013 at 22:52
Explore related questions
See similar questions with these tags.