<?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: delete duplicates records based on field in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/re-delete-duplicates-records-based-on-field/m-p/1277181#M67406</link>
    <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I have this repetitive "RO." and I want to delete but keep "AB, AR, AG, BC ... etc". How can I do that?&lt;/P&gt;</description>
    <pubDate>Tue, 11 Apr 2023 08:37:19 GMT</pubDate>
    <dc:creator>Sebastian-VlăduțCristea</dc:creator>
    <dc:date>2023-04-11T08:37:19Z</dc:date>
    <item>
      <title>Re: delete duplicates records based on field</title>
      <link>https://community.esri.com/t5/python-questions/re-delete-duplicates-records-based-on-field/m-p/1277181#M67406</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I have this repetitive "RO." and I want to delete but keep "AB, AR, AG, BC ... etc". How can I do that?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2023 08:37:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/re-delete-duplicates-records-based-on-field/m-p/1277181#M67406</guid>
      <dc:creator>Sebastian-VlăduțCristea</dc:creator>
      <dc:date>2023-04-11T08:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: delete duplicates records based on field</title>
      <link>https://community.esri.com/t5/python-questions/re-delete-duplicates-records-based-on-field/m-p/1278244#M67407</link>
      <description>&lt;P&gt;Try a field calculator.&lt;/P&gt;&lt;P&gt;In Arcade:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Replace($feature.HASC_1, "RO.", "")&lt;/LI-CODE&gt;&lt;P&gt;Test on one record before doing the whole table.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2023 13:49:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/re-delete-duplicates-records-based-on-field/m-p/1278244#M67407</guid>
      <dc:creator>AlfredBaldenweck</dc:creator>
      <dc:date>2023-04-13T13:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: delete duplicates records based on field</title>
      <link>https://community.esri.com/t5/python-questions/re-delete-duplicates-records-based-on-field/m-p/1278245#M67408</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/673820"&gt;@Sebastian-VlăduțCristea&lt;/a&gt;I moved this to be its own question because that thread was posted back in 2016.&lt;/P&gt;&lt;P&gt;To remove the RO. you can use an update cursor:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;with arcpy.da.UpdateCursor(fc, ['HASC_1']) as uCur:
    for row in uCur:
        row[0] = row[0].split('.')[-1]
        uCur.updateRow(row)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/data-access/updatecursor-class.htm" target="_blank" rel="noopener"&gt;updatecursor-class.htm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2023 13:50:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/re-delete-duplicates-records-based-on-field/m-p/1278245#M67408</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2023-04-13T13:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: delete duplicates records based on field</title>
      <link>https://community.esri.com/t5/python-questions/re-delete-duplicates-records-based-on-field/m-p/1278249#M67410</link>
      <description>&lt;P&gt;Yep. &lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/calculate-field.htm" target="_self"&gt;Calculate Field&lt;/A&gt; is what you want. For variety, here's the Python equivalent.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;!HASC_1!.replace("RO.", "")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Apr 2023 13:52:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/re-delete-duplicates-records-based-on-field/m-p/1278249#M67410</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2023-04-13T13:52:44Z</dc:date>
    </item>
  </channel>
</rss>

