<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Add a city field and state field to a table of zip codes with Python in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/add-a-city-field-and-state-field-to-a-table-of-zip/m-p/126762#M9882</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was thinking of creating a separate csv file and creating a list of zip codes/cities/states manually.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Oct 2020 00:22:24 GMT</pubDate>
    <dc:creator>WicketWarrick</dc:creator>
    <dc:date>2020-10-23T00:22:24Z</dc:date>
    <item>
      <title>Add a city field and state field to a table of zip codes with Python</title>
      <link>https://community.esri.com/t5/python-questions/add-a-city-field-and-state-field-to-a-table-of-zip/m-p/126760#M9880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px var(--s-prose-spacing) 0px;"&gt;I have a shapefile of zip codes in the U.S. I am brand new to coding. Using Python, how can I add a city field and state field with the appropriate cities/states for each zip code?&lt;/P&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px; margin: 0px 0px var(--s-prose-spacing) 0px;"&gt;I need to do this with the import arcpy module.&amp;nbsp;&lt;/P&gt;&lt;P style="color: #242729; background-color: #ffffff; border: 0px;"&gt;Is this possible?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Oct 2020 23:09:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/add-a-city-field-and-state-field-to-a-table-of-zip/m-p/126760#M9880</guid>
      <dc:creator>WicketWarrick</dc:creator>
      <dc:date>2020-10-22T23:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: Add a city field and state field to a table of zip codes with Python</title>
      <link>https://community.esri.com/t5/python-questions/add-a-city-field-and-state-field-to-a-table-of-zip/m-p/126761#M9881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is no arcpy method or property that can translate zip codes to what you want.&amp;nbsp; You need to find a data source that contains the conversion and perform a "join" to your existing dataset&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2020 00:08:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/add-a-city-field-and-state-field-to-a-table-of-zip/m-p/126761#M9881</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2020-10-23T00:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: Add a city field and state field to a table of zip codes with Python</title>
      <link>https://community.esri.com/t5/python-questions/add-a-city-field-and-state-field-to-a-table-of-zip/m-p/126762#M9882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was thinking of creating a separate csv file and creating a list of zip codes/cities/states manually.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2020 00:22:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/add-a-city-field-and-state-field-to-a-table-of-zip/m-p/126762#M9882</guid>
      <dc:creator>WicketWarrick</dc:creator>
      <dc:date>2020-10-23T00:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: Add a city field and state field to a table of zip codes with Python</title>
      <link>https://community.esri.com/t5/python-questions/add-a-city-field-and-state-field-to-a-table-of-zip/m-p/126763#M9883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you had the data matching zipcodes to cities and states you would simply perform a join. however if all your data is geospatial (polygons etc..) and you wish to update the fields you could perform the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;however if you have the cities and states as shapefiles&amp;nbsp;&lt;/P&gt;&lt;P&gt;adding the fields would be done along these lines:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #006a00; font-family: &amp;amp;quot; consolas&amp;amp;quot;,&amp;amp;quot;andale mono&amp;amp;quot;,&amp;amp;quot;lucida console&amp;amp;quot;,&amp;amp;quot;monaco&amp;amp;quot;,monospace; font-size: 14.46px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;# Import system modules&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f8f8f8; color: #595959; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 0.85em; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.4rem; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #aa0d91; font-family: &amp;amp;quot; consolas&amp;amp;quot;,&amp;amp;quot;andale mono&amp;amp;quot;,&amp;amp;quot;lucida console&amp;amp;quot;,&amp;amp;quot;monaco&amp;amp;quot;,monospace; font-size: 14.46px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;import&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f8f8f8; color: #595959; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 0.85em; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.4rem; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt; arcpy &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #006a00; font-family: &amp;amp;quot; consolas&amp;amp;quot;,&amp;amp;quot;andale mono&amp;amp;quot;,&amp;amp;quot;lucida console&amp;amp;quot;,&amp;amp;quot;monaco&amp;amp;quot;,monospace; font-size: 14.46px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;# Set environment settings&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f8f8f8; color: #595959; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 0.85em; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.4rem; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f8f8f8; color: #595959; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 0.85em; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.4rem; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;arcpy.env.workspace = &lt;/SPAN&gt;&lt;SPAN style="color: #c41a16; font-family: &amp;amp;quot; consolas&amp;amp;quot;,&amp;amp;quot;andale mono&amp;amp;quot;,&amp;amp;quot;lucida console&amp;amp;quot;,&amp;amp;quot;monaco&amp;amp;quot;,monospace; font-size: 14.46px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;"C:/data/"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f8f8f8; color: #595959; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 0.85em; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.4rem; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #006a00; font-family: &amp;amp;quot; consolas&amp;amp;quot;,&amp;amp;quot;andale mono&amp;amp;quot;,&amp;amp;quot;lucida console&amp;amp;quot;,&amp;amp;quot;monaco&amp;amp;quot;,monospace; font-size: 14.46px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;# Set local variables&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f8f8f8; color: #595959; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 0.85em; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.4rem; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f8f8f8; color: #595959; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 0.85em; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.4rem; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;inFeatures = &lt;/SPAN&gt;&lt;SPAN style="color: #c41a16; font-family: &amp;amp;quot; consolas&amp;amp;quot;,&amp;amp;quot;andale mono&amp;amp;quot;,&amp;amp;quot;lucida console&amp;amp;quot;,&amp;amp;quot;monaco&amp;amp;quot;,monospace; font-size: 14.46px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;"zipcodes.shp"&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f8f8f8; color: #595959; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 0.85em; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.4rem; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f8f8f8; color: #595959; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 0.85em; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.4rem; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;fieldName1 = &lt;/SPAN&gt;&lt;SPAN style="color: #c41a16; font-family: &amp;amp;quot; consolas&amp;amp;quot;,&amp;amp;quot;andale mono&amp;amp;quot;,&amp;amp;quot;lucida console&amp;amp;quot;,&amp;amp;quot;monaco&amp;amp;quot;,monospace; font-size: 14.46px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;"city"&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f8f8f8; color: #595959; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 0.85em; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.4rem; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f8f8f8; color: #595959; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 0.85em; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.4rem; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;field_length1 = &lt;SPAN style="color: #008002; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: medium; background-color: transparent;"&gt;8&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f8f8f8; color: #595959; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 0.85em; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.4rem; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f8f8f8; color: #595959; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 0.85em; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.4rem; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;fieldName2 = &lt;/SPAN&gt;&lt;SPAN style="color: #c41a16; font-family: &amp;amp;quot; consolas&amp;amp;quot;,&amp;amp;quot;andale mono&amp;amp;quot;,&amp;amp;quot;lucida console&amp;amp;quot;,&amp;amp;quot;monaco&amp;amp;quot;,monospace; font-size: 14.46px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;"state"&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f8f8f8; color: #595959; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 0.85em; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.4rem; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f8f8f8; color: #595959; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 0.85em; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.4rem; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;fieldLength2 = &lt;/SPAN&gt;&lt;SPAN style="color: #1c00cf; font-family: &amp;amp;quot; consolas&amp;amp;quot;,&amp;amp;quot;andale mono&amp;amp;quot;,&amp;amp;quot;lucida console&amp;amp;quot;,&amp;amp;quot;monaco&amp;amp;quot;,monospace; font-size: 14.46px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;10&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f8f8f8; color: #595959; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 0.85em; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.4rem; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #006a00; font-family: &amp;amp;quot; consolas&amp;amp;quot;,&amp;amp;quot;andale mono&amp;amp;quot;,&amp;amp;quot;lucida console&amp;amp;quot;,&amp;amp;quot;monaco&amp;amp;quot;,monospace; font-size: 14.46px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;# Execute AddField twice for two new fields&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f8f8f8; color: #595959; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 0.85em; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.4rem; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f8f8f8; color: #595959; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 0.85em; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.4rem; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;arcpy.AddField_management(inFeatures, fieldName1, &lt;/SPAN&gt;&lt;SPAN style="color: #c41a16; font-family: &amp;amp;quot; consolas&amp;amp;quot;,&amp;amp;quot;andale mono&amp;amp;quot;,&amp;amp;quot;lucida console&amp;amp;quot;,&amp;amp;quot;monaco&amp;amp;quot;,monospace; font-size: 14.46px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;"TEXT"&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f8f8f8; color: #595959; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 0.85em; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.4rem; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;,field_length=field_length1&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f8f8f8; color: #595959; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 0.85em; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.4rem; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f8f8f8; color: #595959; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 0.85em; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.4rem; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;arcpy.AddField_management(inFeatures, fieldName2, &lt;/SPAN&gt;&lt;SPAN style="color: #c41a16; font-family: &amp;amp;quot; consolas&amp;amp;quot;,&amp;amp;quot;andale mono&amp;amp;quot;,&amp;amp;quot;lucida console&amp;amp;quot;,&amp;amp;quot;monaco&amp;amp;quot;,monospace; font-size: 14.46px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;"TEXT"&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #f8f8f8; color: #595959; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 0.85em; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 1.4rem; orphans: 2; overflow-wrap: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre; word-spacing: 0px;"&gt;, field_length=fieldLength2)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;once the fields are added they could be updated using something similar to this:&lt;/P&gt;&lt;OL style="background-color: #ffffff; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #5c5c5c; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; list-style-image: none; list-style-position: outside; list-style-type: decimal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px 0px 1px 45px; border: medium none currentColor;"&gt;&lt;LI style="background-color: #f6f6f6; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #5c5c5c; display: list-item; font-family: inherit; font-size: 100%; font-style: inherit; font-weight: inherit; height: auto; line-height: inherit; list-style-image: none; list-style-position: outside; list-style-type: decimal-leading-zero; min-height: 0px; outline-color: invert; outline-style: none; outline-width: 0px; overflow-wrap: break-word; position: relative; vertical-align: baseline; white-space: nowrap; border-width: medium medium medium 3px; border-color: currentColor currentColor currentColor #6ce26c; border-style: none none none solid; padding: 0px 3px 0px 10px; margin: 0px;"&gt;&lt;P&gt;&lt;SPAN style="background-color: inherit; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: black; font-family: Consolas,Courier New,Courier,mono,serif; font-size: 9pt; font-style: inherit; font-weight: inherit; outline-color: invert; outline-style: none; outline-width: 0px; vertical-align: baseline; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;cityFC&amp;nbsp;=&amp;nbsp;r"C:\data\city_polygons.shp"&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI style="background-color: #ffffff; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: inherit; display: list-item; font-family: inherit; font-size: 100%; font-style: inherit; font-weight: inherit; height: auto; line-height: inherit; list-style-image: none; list-style-position: outside; list-style-type: decimal-leading-zero; min-height: 0px; outline-color: invert; outline-style: none; outline-width: 0px; overflow-wrap: break-word; position: relative; vertical-align: baseline; white-space: nowrap; border-width: medium medium medium 3px; border-color: currentColor currentColor currentColor #6ce26c; border-style: none none none solid; padding: 0px 3px 0px 10px; margin: 0px;"&gt;&lt;P&gt;&lt;SPAN style="background-color: inherit; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: black; font-family: Consolas,Courier New,Courier,mono,serif; font-size: 9pt; font-style: inherit; font-weight: inherit; outline-color: invert; outline-style: none; outline-width: 0px; vertical-align: baseline; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;stateFC&amp;nbsp;=&amp;nbsp;r"C:\data\state_polygons.shp"&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI style="background-color: #f6f6f6; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #5c5c5c; display: list-item; font-family: inherit; font-size: 100%; font-style: inherit; font-weight: inherit; height: auto; line-height: inherit; list-style-image: none; list-style-position: outside; list-style-type: decimal-leading-zero; min-height: 0px; outline-color: invert; outline-style: none; outline-width: 0px; overflow-wrap: break-word; position: relative; vertical-align: baseline; white-space: nowrap; border-width: medium medium medium 3px; border-color: currentColor currentColor currentColor #6ce26c; border-style: none none none solid; padding: 0px 3px 0px 10px; margin: 0px;"&gt;&lt;P&gt;&lt;SPAN style="background-color: inherit; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: black; font-family: Consolas,Courier New,Courier,mono,serif; font-size: 9pt; font-style: inherit; font-weight: inherit; outline-color: invert; outline-style: none; outline-width: 0px; vertical-align: baseline; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;arcpy.MakeFeatureLayer_management(infeatures,&amp;nbsp;"index_fl")&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI style="background-color: #ffffff; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: inherit; display: list-item; font-family: inherit; font-size: 100%; font-style: inherit; font-weight: inherit; height: auto; line-height: inherit; list-style-image: none; list-style-position: outside; list-style-type: decimal-leading-zero; min-height: 0px; outline-color: invert; outline-style: none; outline-width: 0px; overflow-wrap: break-word; position: relative; vertical-align: baseline; white-space: nowrap; border-width: medium medium medium 3px; border-color: currentColor currentColor currentColor #6ce26c; border-style: none none none solid; padding: 0px 3px 0px 10px; margin: 0px;"&gt;&lt;P&gt;&lt;SPAN style="background-color: inherit; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: black; font-family: Consolas,Courier New,Courier,mono,serif; font-size: 9pt; font-style: inherit; font-weight: inherit; outline-color: invert; outline-style: none; outline-width: 0px; vertical-align: baseline; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;searchRows&amp;nbsp;=&amp;nbsp;arcpy.da.SearchCursor(cityFC,&amp;nbsp;["SHAPE@","CITY_NAME"])&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI style="background-color: #f6f6f6; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #5c5c5c; display: list-item; font-family: inherit; font-size: 100%; font-style: inherit; font-weight: inherit; height: auto; line-height: inherit; list-style-image: none; list-style-position: outside; list-style-type: decimal-leading-zero; min-height: 0px; outline-color: invert; outline-style: none; outline-width: 0px; overflow-wrap: break-word; position: relative; vertical-align: baseline; white-space: nowrap; border-width: medium medium medium 3px; border-color: currentColor currentColor currentColor #6ce26c; border-style: none none none solid; padding: 0px 3px 0px 10px; margin: 0px;"&gt;&lt;P&gt;&lt;SPAN style="background-color: inherit; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: black; font-family: Consolas,Courier New,Courier,mono,serif; font-size: 9pt; font-style: inherit; font-weight: inherit; outline-color: invert; outline-style: none; outline-width: 0px; vertical-align: baseline; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;for&amp;nbsp;searchRow&amp;nbsp;in&amp;nbsp;searchRows:&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI style="background-color: #ffffff; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: inherit; display: list-item; font-family: inherit; font-size: 100%; font-style: inherit; font-weight: inherit; height: auto; line-height: inherit; list-style-image: none; list-style-position: outside; list-style-type: decimal-leading-zero; min-height: 0px; outline-color: invert; outline-style: none; outline-width: 0px; overflow-wrap: break-word; position: relative; vertical-align: baseline; white-space: nowrap; border-width: medium medium medium 3px; border-color: currentColor currentColor currentColor #6ce26c; border-style: none none none solid; padding: 0px 3px 0px 10px; margin: 0px;"&gt;&lt;P&gt;&lt;SPAN style="background-color: inherit; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: black; font-family: Consolas,Courier New,Courier,mono,serif; font-size: 9pt; font-style: inherit; font-weight: inherit; outline-color: invert; outline-style: none; outline-width: 0px; vertical-align: baseline; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;geomObj,&amp;nbsp;cityName&amp;nbsp;=&amp;nbsp;searchRow&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI style="background-color: #f6f6f6; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #5c5c5c; display: list-item; font-family: inherit; font-size: 100%; font-style: inherit; font-weight: inherit; height: auto; line-height: inherit; list-style-image: none; list-style-position: outside; list-style-type: decimal-leading-zero; min-height: 0px; outline-color: invert; outline-style: none; outline-width: 0px; overflow-wrap: break-word; position: relative; vertical-align: baseline; white-space: nowrap; border-width: medium medium medium 3px; border-color: currentColor currentColor currentColor #6ce26c; border-style: none none none solid; padding: 0px 3px 0px 10px; margin: 0px;"&gt;&lt;P&gt;&lt;SPAN style="background-color: inherit; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: black; font-family: Consolas,Courier New,Courier,mono,serif; font-size: 9pt; font-style: inherit; font-weight: inherit; outline-color: invert; outline-style: none; outline-width: 0px; vertical-align: baseline; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;arcpy.SelectLayerByLocation_management("index_fl",&amp;nbsp;"INTERSECT",&amp;nbsp;geomObj,&amp;nbsp;"",&amp;nbsp;"NEW_SELECTION")&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI style="background-color: #ffffff; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: inherit; display: list-item; font-family: inherit; font-size: 100%; font-style: inherit; font-weight: inherit; height: auto; line-height: inherit; list-style-image: none; list-style-position: outside; list-style-type: decimal-leading-zero; min-height: 0px; outline-color: invert; outline-style: none; outline-width: 0px; overflow-wrap: break-word; position: relative; vertical-align: baseline; white-space: nowrap; border-width: medium medium medium 3px; border-color: currentColor currentColor currentColor #6ce26c; border-style: none none none solid; padding: 0px 3px 0px 10px; margin: 0px;"&gt;&lt;P&gt;&lt;SPAN style="background-color: inherit; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: black; font-family: Consolas,Courier New,Courier,mono,serif; font-size: 9pt; font-style: inherit; font-weight: inherit; outline-color: invert; outline-style: none; outline-width: 0px; vertical-align: baseline; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;arcpy.CalculateField_management(infeatures,&amp;nbsp;"city",&amp;nbsp;"'"&amp;nbsp;+&amp;nbsp;cityName&amp;nbsp;+&amp;nbsp;"'",&amp;nbsp;"PYTHON",&amp;nbsp;"")&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI style="background-color: #ffffff; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: inherit; display: list-item; font-family: inherit; font-size: 100%; font-style: inherit; font-weight: inherit; height: auto; line-height: inherit; list-style-image: none; list-style-position: outside; list-style-type: decimal-leading-zero; min-height: 0px; outline-color: invert; outline-style: none; outline-width: 0px; overflow-wrap: break-word; position: relative; vertical-align: baseline; white-space: nowrap; border-width: medium medium medium 3px; border-color: currentColor currentColor currentColor #6ce26c; border-style: none none none solid; padding: 0px 3px 0px 10px; margin: 0px;"&gt;&lt;P&gt;&lt;SPAN style="background-color: inherit; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: black; font-family: Consolas,Courier New,Courier,mono,serif; font-size: 9pt; font-style: inherit; font-weight: inherit; outline-color: invert; outline-style: none; outline-width: 0px; vertical-align: baseline; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;searchRows&amp;nbsp;=&amp;nbsp;arcpy.da.SearchCursor(stateFC,&amp;nbsp;["SHAPE@","STATE_NAME"])&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="overflow-wrap: break-word; padding: 0px; margin: 0px;"&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI style="background-color: #ffffff; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: inherit; display: list-item; font-family: inherit; font-size: 100%; font-style: inherit; font-weight: inherit; height: auto; line-height: inherit; list-style-image: none; list-style-position: outside; list-style-type: decimal-leading-zero; min-height: 0px; outline-color: invert; outline-style: none; outline-width: 0px; overflow-wrap: break-word; position: relative; vertical-align: baseline; white-space: nowrap; border-width: medium medium medium 3px; border-color: currentColor currentColor currentColor #6ce26c; border-style: none none none solid; padding: 0px 3px 0px 10px; margin: 0px;"&gt;&lt;P style="overflow-wrap: break-word; padding: 0px; margin: 0px;"&gt;&lt;SPAN style="background-color: inherit; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: black; font-family: Consolas,Courier New,Courier,mono,serif; font-size: 9pt; font-style: inherit; font-weight: inherit; outline-color: invert; outline-style: none; outline-width: 0px; vertical-align: baseline; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;for&amp;nbsp;searchRow&amp;nbsp;in&amp;nbsp;searchRows:&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="overflow-wrap: break-word; padding: 0px; margin: 0px;"&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI style="background-color: #ffffff; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: inherit; display: list-item; font-family: inherit; font-size: 100%; font-style: inherit; font-weight: inherit; height: auto; line-height: inherit; list-style-image: none; list-style-position: outside; list-style-type: decimal-leading-zero; min-height: 0px; outline-color: invert; outline-style: none; outline-width: 0px; overflow-wrap: break-word; position: relative; vertical-align: baseline; white-space: nowrap; border-width: medium medium medium 3px; border-color: currentColor currentColor currentColor #6ce26c; border-style: none none none solid; padding: 0px 3px 0px 10px; margin: 0px;"&gt;&lt;P style="overflow-wrap: break-word; padding: 0px; margin: 0px;"&gt;&lt;SPAN style="background-color: inherit; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: black; font-family: Consolas,Courier New,Courier,mono,serif; font-size: 9pt; font-style: inherit; font-weight: inherit; outline-color: invert; outline-style: none; outline-width: 0px; vertical-align: baseline; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;geomObj, stateName&amp;nbsp;=&amp;nbsp;searchRow&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="overflow-wrap: break-word; padding: 0px; margin: 0px;"&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI style="background-color: #ffffff; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: inherit; display: list-item; font-family: inherit; font-size: 100%; font-style: inherit; font-weight: inherit; height: auto; line-height: inherit; list-style-image: none; list-style-position: outside; list-style-type: decimal-leading-zero; min-height: 0px; outline-color: invert; outline-style: none; outline-width: 0px; overflow-wrap: break-word; position: relative; vertical-align: baseline; white-space: nowrap; border-width: medium medium medium 3px; border-color: currentColor currentColor currentColor #6ce26c; border-style: none none none solid; padding: 0px 3px 0px 10px; margin: 0px;"&gt;&lt;P style="overflow-wrap: break-word; padding: 0px; margin: 0px;"&gt;&lt;SPAN style="background-color: inherit; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: black; font-family: Consolas,Courier New,Courier,mono,serif; font-size: 9pt; font-style: inherit; font-weight: inherit; outline-color: invert; outline-style: none; outline-width: 0px; vertical-align: baseline; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;arcpy.SelectLayerByLocation_management("index_fl",&amp;nbsp;"INTERSECT",&amp;nbsp;geomObj,&amp;nbsp;"",&amp;nbsp;"NEW_SELECTION")&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="overflow-wrap: break-word; padding: 0px; margin: 0px;"&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI style="background-color: #ffffff; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: inherit; display: list-item; font-family: inherit; font-size: 100%; font-style: inherit; font-weight: inherit; height: auto; line-height: inherit; list-style-image: none; list-style-position: outside; list-style-type: decimal-leading-zero; min-height: 0px; outline-color: invert; outline-style: none; outline-width: 0px; overflow-wrap: break-word; position: relative; vertical-align: baseline; white-space: nowrap; border-width: medium medium medium 3px; border-color: currentColor currentColor currentColor #6ce26c; border-style: none none none solid; padding: 0px 3px 0px 10px; margin: 0px;"&gt;&lt;P style="overflow-wrap: break-word; padding: 0px; margin: 0px;"&gt;&lt;SPAN style="background-color: inherit; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: black; font-family: Consolas,Courier New,Courier,mono,serif; font-size: 9pt; font-style: inherit; font-weight: inherit; outline-color: invert; outline-style: none; outline-width: 0px; vertical-align: baseline; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;arcpy.CalculateField_management(infeatures,&amp;nbsp;"city",&amp;nbsp;"'"&amp;nbsp;+ stateName&amp;nbsp;+&amp;nbsp;"'",&amp;nbsp;"PYTHON",&amp;nbsp;"")&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2020 01:08:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/add-a-city-field-and-state-field-to-a-table-of-zip/m-p/126763#M9883</guid>
      <dc:creator>MatthewBrown7</dc:creator>
      <dc:date>2020-10-23T01:08:06Z</dc:date>
    </item>
    <item>
      <title>Re: Add a city field and state field to a table of zip codes with Python</title>
      <link>https://community.esri.com/t5/python-questions/add-a-city-field-and-state-field-to-a-table-of-zip/m-p/126764#M9884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this might be useful:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/docs/DOC-15525-httpssimplemapscomdataus-zips"&gt;https://community.esri.com/docs/DOC-15525-httpssimplemapscomdataus-zips&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2020 01:18:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/add-a-city-field-and-state-field-to-a-table-of-zip/m-p/126764#M9884</guid>
      <dc:creator>MatthewBrown7</dc:creator>
      <dc:date>2020-10-23T01:18:46Z</dc:date>
    </item>
  </channel>
</rss>

