<?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: Python ArcMap Fill Empty Space in Attribute table in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/python-arcmap-fill-empty-space-in-attribute-table/m-p/882630#M5184</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ryan-&amp;nbsp; with your keen interest in arcpy, here is a little tip when working with cursors: you can create a variable to hold your list of attribute field names and get extra style points for it:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;fields &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'SYM'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'ZONE_SUBTY'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Label'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'FLD_ZONE'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;with&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;UpdateCursor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Export_Output"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; fields&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; rows&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; row &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; rows&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;BTW,&amp;nbsp; Dan's str() method is missing the closing paren- he did that just to see if I'd notice....&amp;nbsp; &amp;nbsp;&lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 11:09:06 GMT</pubDate>
    <dc:creator>JoeBorgione</dc:creator>
    <dc:date>2021-12-12T11:09:06Z</dc:date>
    <item>
      <title>Python ArcMap Fill Empty Space in Attribute table</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/python-arcmap-fill-empty-space-in-attribute-table/m-p/882628#M5182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to fill specific rows of data that have no data in them with a combination of data from other fields within the attribute table. I'm currently using the UpdateCursor command and I have this code worked out and it runs with no errors but, nothing happens.... The rows don't fill in with the data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with arcpy.da.UpdateCursor("Export_Output", ["SYM", "ZONE_SUBTY","Label","FLD_ZONE"]) as rows:&lt;BR /&gt;... for row in rows:&lt;BR /&gt;... if row[0] == "":&lt;BR /&gt;... row[2] = "row[3]“-”row[1]"&lt;BR /&gt;... row[0] = "SPECIAL"&lt;BR /&gt;... rows.updateRow(row)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Nov 2018 04:39:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/python-arcmap-fill-empty-space-in-attribute-table/m-p/882628#M5182</guid>
      <dc:creator>RyanPhillips2</dc:creator>
      <dc:date>2018-11-22T04:39:48Z</dc:date>
    </item>
    <item>
      <title>Re: Python ArcMap Fill Empty Space in Attribute table</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/python-arcmap-fill-empty-space-in-attribute-table/m-p/882629#M5183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;if row[0] is None:
&amp;nbsp;&amp;nbsp;&amp;nbsp; row[2] = str(row[3] - row[1]"&amp;nbsp; # assuming row[3] and row]1] are numeric&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I am assuming the noted comment on line 2.&lt;/P&gt;&lt;P&gt;Your incarnation of line 1 won't work unless there is a string in it.&amp;nbsp; If the field contains &amp;lt;null&amp;gt; values, then you have to test for None&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 11:09:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/python-arcmap-fill-empty-space-in-attribute-table/m-p/882629#M5183</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-12T11:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: Python ArcMap Fill Empty Space in Attribute table</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/python-arcmap-fill-empty-space-in-attribute-table/m-p/882630#M5184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ryan-&amp;nbsp; with your keen interest in arcpy, here is a little tip when working with cursors: you can create a variable to hold your list of attribute field names and get extra style points for it:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;fields &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'SYM'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'ZONE_SUBTY'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Label'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'FLD_ZONE'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;with&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;UpdateCursor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Export_Output"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; fields&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; rows&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; row &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; rows&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;BTW,&amp;nbsp; Dan's str() method is missing the closing paren- he did that just to see if I'd notice....&amp;nbsp; &amp;nbsp;&lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 11:09:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/python-arcmap-fill-empty-space-in-attribute-table/m-p/882630#M5184</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2021-12-12T11:09:06Z</dc:date>
    </item>
    <item>
      <title>Re: Python ArcMap Fill Empty Space in Attribute table</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/python-arcmap-fill-empty-space-in-attribute-table/m-p/882631#M5185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;good catch... I will leave it to see if others catch it &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Nov 2018 12:46:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/python-arcmap-fill-empty-space-in-attribute-table/m-p/882631#M5185</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-11-22T12:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: Python ArcMap Fill Empty Space in Attribute table</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/python-arcmap-fill-empty-space-in-attribute-table/m-p/882632#M5186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/346557"&gt;Ryan Phillips&lt;/A&gt;‌, for future reference, the &lt;A href="https://community.esri.com/space/2145"&gt;Python&lt;/A&gt;‌ place/space is where ArcPy questions usually get asked.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Nov 2018 13:09:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/python-arcmap-fill-empty-space-in-attribute-table/m-p/882632#M5186</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2018-11-23T13:09:13Z</dc:date>
    </item>
  </channel>
</rss>

