<?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: Script python in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/script-python/m-p/311640#M24268</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I work on a place name entity class with a table containing a field "ABBREVIATION" and another field "FULL_NAME".&lt;BR /&gt;&lt;BR /&gt;example&lt;BR /&gt;&lt;BR /&gt;The "ABBREVIATION" contains&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Ch.'&lt;BR /&gt;The fields "FULL_NAME" contains&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Church '&lt;BR /&gt;&lt;BR /&gt;I will receive regular updates. In what way (python script), I know if new entries appear on my table update!&lt;BR /&gt;&lt;BR /&gt;Look at the diagram attached.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Pierre,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess the "&lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//001700000007000000" rel="nofollow noopener noreferrer" target="_blank"&gt;Table Compare (Data Management)&lt;/A&gt;&lt;SPAN&gt;" could be an option for you. The link contains some Python snippets. Maybe it's better to use some python code to do this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jason Scheirer and Chris Snyder posted some nice examples a few days ago in &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/95843-python-Built-In-Types-for-sets" rel="nofollow noopener noreferrer" target="_blank"&gt;this thread&lt;/A&gt;&lt;SPAN&gt;. If you combine their suggestions you end up with:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
set_one = set(r[0] for r in arcpy.da.SearchCursor("Table1", "ABBREVIATION"))
set_two = set(r[0] for r in arcpy.da.SearchCursor("Table2", "ABBREVIATION"))
print "Set2 difference set1: {0}".format(set_two.difference(set_one))
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This will print out:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family:courier new;"&gt;Set2 difference set1: set([u'Mon.', u'Foot.'])&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This set contains a list of the items in the second table which are not in the first table. What you need to know too, is that it will only check for the abbreviation and not the "full name". If the full name of an abbreviation has changed this code will not find it. To do that you will need to use dictionaries (which a collections of key, value pairs). Then loop through these and check both the abbreviation and full name.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kind regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Xander&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 14:54:20 GMT</pubDate>
    <dc:creator>XanderBakker</dc:creator>
    <dc:date>2021-12-11T14:54:20Z</dc:date>
    <item>
      <title>Script python</title>
      <link>https://community.esri.com/t5/python-questions/script-python/m-p/311639#M24267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I work on a place name entity class with a table containing a field "ABBREVIATION" and another field "FULL_NAME".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;example&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The "ABBREVIATION" contains&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Ch.'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The fields "FULL_NAME" contains&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Church '&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I will receive regular updates. In what way (python script), I know if new entries appear on my table update!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Look at the diagram attached.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Nov 2013 00:39:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-python/m-p/311639#M24267</guid>
      <dc:creator>PierreWeisse</dc:creator>
      <dc:date>2013-11-04T00:39:02Z</dc:date>
    </item>
    <item>
      <title>Re: Script python</title>
      <link>https://community.esri.com/t5/python-questions/script-python/m-p/311640#M24268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I work on a place name entity class with a table containing a field "ABBREVIATION" and another field "FULL_NAME".&lt;BR /&gt;&lt;BR /&gt;example&lt;BR /&gt;&lt;BR /&gt;The "ABBREVIATION" contains&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Ch.'&lt;BR /&gt;The fields "FULL_NAME" contains&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Church '&lt;BR /&gt;&lt;BR /&gt;I will receive regular updates. In what way (python script), I know if new entries appear on my table update!&lt;BR /&gt;&lt;BR /&gt;Look at the diagram attached.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Pierre,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess the "&lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//001700000007000000" rel="nofollow noopener noreferrer" target="_blank"&gt;Table Compare (Data Management)&lt;/A&gt;&lt;SPAN&gt;" could be an option for you. The link contains some Python snippets. Maybe it's better to use some python code to do this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jason Scheirer and Chris Snyder posted some nice examples a few days ago in &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/95843-python-Built-In-Types-for-sets" rel="nofollow noopener noreferrer" target="_blank"&gt;this thread&lt;/A&gt;&lt;SPAN&gt;. If you combine their suggestions you end up with:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
set_one = set(r[0] for r in arcpy.da.SearchCursor("Table1", "ABBREVIATION"))
set_two = set(r[0] for r in arcpy.da.SearchCursor("Table2", "ABBREVIATION"))
print "Set2 difference set1: {0}".format(set_two.difference(set_one))
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This will print out:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family:courier new;"&gt;Set2 difference set1: set([u'Mon.', u'Foot.'])&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This set contains a list of the items in the second table which are not in the first table. What you need to know too, is that it will only check for the abbreviation and not the "full name". If the full name of an abbreviation has changed this code will not find it. To do that you will need to use dictionaries (which a collections of key, value pairs). Then loop through these and check both the abbreviation and full name.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kind regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Xander&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:54:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/script-python/m-p/311640#M24268</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-12-11T14:54:20Z</dc:date>
    </item>
  </channel>
</rss>

