Timeline for Replacing integer values in field using ArcPy for ArcGIS Pro?
Current License: CC BY-SA 4.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 17, 2018 at 10:36 | vote | accept | Theo F | ||
Sep 17, 2018 at 10:34 | comment | added | HavardMoe | Although... in a standalone script it would be more efficient to use an UpdataCursor, as @BERA mentions above | |
Sep 17, 2018 at 10:24 | comment | added | HavardMoe | You can use field calculator in arcpy, see here (example 3 shows use with a code block): pro.arcgis.com/en/pro-app/tool-reference/data-management/… | |
Sep 17, 2018 at 10:12 | comment | added | Theo F | thanks. that works fine in Field Calculator within the application. However, I'd like to implement this as part of a standalone Python script (see my edited original question). Do you know how I could do this? | |
Sep 17, 2018 at 10:10 | comment | added | HavardMoe | I've edited in a suggestion in the answer above. If there are several replaces they can be added in as elif statements in the same code. | |
Sep 17, 2018 at 10:10 | vote | accept | Theo F | ||
Sep 17, 2018 at 10:11 | |||||
Sep 17, 2018 at 10:09 | history | edited | HavardMoe | CC BY-SA 4.0 |
added 42 characters in body
|
Sep 17, 2018 at 10:02 | history | edited | HavardMoe | CC BY-SA 4.0 |
added 74 characters in body
|
Sep 17, 2018 at 9:59 | comment | added | Theo F | Yes that was my feeling regarding it being a string function. I'm still a bit of an arcpy noob. So what would the code be if I wanted to replace 1250 with 810? Do I need to type in the Code Block area? | |
Sep 17, 2018 at 9:53 | history | answered | HavardMoe | CC BY-SA 4.0 |