<?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: Eliminating Duplicate Rows (keeping first duplicate) in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Eliminating-Duplicate-Rows-keeping-first-duplicate/m-p/51224#M29072</link>
    <description>&lt;P&gt;That's great!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Meanwhile (in JMP 13), this should&amp;nbsp;be equivalent&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// Keep first instance of duplicates only
dt &amp;lt;&amp;lt; select where(Col Min(Row(), :a, :b, :c) &amp;lt; Row()) &amp;lt;&amp;lt; delete rows;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 13 Feb 2018 21:42:23 GMT</pubDate>
    <dc:creator>ms</dc:creator>
    <dc:date>2018-02-13T21:42:23Z</dc:date>
    <item>
      <title>Eliminating Duplicate Rows (keeping first duplicate)</title>
      <link>https://community.jmp.com/t5/Discussions/Eliminating-Duplicate-Rows-keeping-first-duplicate/m-p/3424#M3424</link>
      <description>I know this has been discussed before, but I'm looking for suggestions for my particular situation.  I have a very large data table (~50 columns x 50,000+ rows).  I need to check for "duplicate rows", where duplicate means the rows match in three columns (eg. ColA, ColB, and ColC).  When duplicates exist, I need to delete all except the first of the matching rows.&lt;BR /&gt;&lt;BR /&gt;Ideally, I'd like to do this with a script as I frequently need to re-pull and re-analyze the updated table.  I suspect I can use a summary table to help with this (at least it will identify &amp;amp; select the duplicate rows).  However, from there I'm not sure how to automate moving through each set of "matched" rows and delete all but the first.</description>
      <pubDate>Fri, 10 Jun 2011 13:59:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Eliminating-Duplicate-Rows-keeping-first-duplicate/m-p/3424#M3424</guid>
      <dc:creator />
      <dc:date>2011-06-10T13:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: Eliminating Duplicate Rows (keeping first duplicate)</title>
      <link>https://community.jmp.com/t5/Discussions/Eliminating-Duplicate-Rows-keeping-first-duplicate/m-p/3425#M3425</link>
      <description>I would use summary on the the 3 matching columns.  Then join the summary table to the original table, match on the same 3 columns, with the drop duplicates option checked, and select only the relevant columns you want for the output table.</description>
      <pubDate>Mon, 13 Jun 2011 14:56:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Eliminating-Duplicate-Rows-keeping-first-duplicate/m-p/3425#M3425</guid>
      <dc:creator>chungwei</dc:creator>
      <dc:date>2011-06-13T14:56:44Z</dc:date>
    </item>
    <item>
      <title>Eliminating Duplicate Rows (keeping first duplicate)</title>
      <link>https://community.jmp.com/t5/Discussions/Eliminating-Duplicate-Rows-keeping-first-duplicate/m-p/3426#M3426</link>
      <description>&lt;P&gt;Thanks that worked great!&amp;nbsp; Here's my code for the script version:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// JMP script to Eliminate duplicate rows "matching Parent, Wafer, &amp;amp; Raw Number"
dt3 = Current Data Table();
dt2 = dt3 &amp;lt;&amp;lt; Summary(
    Group( :Parent, :Meas Wafer Id, :Raw Number )
);
dt = dt3 &amp;lt;&amp;lt; Join(
    With( dt2 ),
    Update,
    By Matching Columns(
        :Parent = :Parent,
        :Meas Wafer Id = :Meas Wafer Id,
        :Raw Number = :Raw Number
    ),
    Drop multiples( 1, 0 ),
    Name( "Include non-matches" )(0, 0),
    Preserve main table order( 1 ),
);
   
Close(dt2, no save);
Close(dt3, no save);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2018 21:20:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Eliminating-Duplicate-Rows-keeping-first-duplicate/m-p/3426#M3426</guid>
      <dc:creator />
      <dc:date>2018-02-13T21:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: Eliminating Duplicate Rows (keeping first duplicate)</title>
      <link>https://community.jmp.com/t5/Discussions/Eliminating-Duplicate-Rows-keeping-first-duplicate/m-p/51194#M29061</link>
      <description>&lt;P&gt;JMP 14 has a new command "Select Duplicate Rows" under the Rows menu, &amp;nbsp;so you can do that directly without having to do a join.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; select duplicate rows(match(:a, :b, :c));
dt &amp;lt;&amp;lt; delete rows;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Feb 2018 21:20:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Eliminating-Duplicate-Rows-keeping-first-duplicate/m-p/51194#M29061</guid>
      <dc:creator>chungwei</dc:creator>
      <dc:date>2018-02-13T21:20:54Z</dc:date>
    </item>
    <item>
      <title>Re: Eliminating Duplicate Rows (keeping first duplicate)</title>
      <link>https://community.jmp.com/t5/Discussions/Eliminating-Duplicate-Rows-keeping-first-duplicate/m-p/51224#M29072</link>
      <description>&lt;P&gt;That's great!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Meanwhile (in JMP 13), this should&amp;nbsp;be equivalent&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// Keep first instance of duplicates only
dt &amp;lt;&amp;lt; select where(Col Min(Row(), :a, :b, :c) &amp;lt; Row()) &amp;lt;&amp;lt; delete rows;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2018 21:42:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Eliminating-Duplicate-Rows-keeping-first-duplicate/m-p/51224#M29072</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2018-02-13T21:42:23Z</dc:date>
    </item>
    <item>
      <title>Re: Eliminating Duplicate Rows (keeping first duplicate)</title>
      <link>https://community.jmp.com/t5/Discussions/Eliminating-Duplicate-Rows-keeping-first-duplicate/m-p/717182#M89884</link>
      <description>&lt;P&gt;May I know if I want to keep the last (not first) of duplicates?&amp;nbsp; How to change the script? Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2024 03:41:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Eliminating-Duplicate-Rows-keeping-first-duplicate/m-p/717182#M89884</guid>
      <dc:creator>Chily</dc:creator>
      <dc:date>2024-01-16T03:41:25Z</dc:date>
    </item>
    <item>
      <title>Re: Eliminating Duplicate Rows (keeping first duplicate)</title>
      <link>https://community.jmp.com/t5/Discussions/Eliminating-Duplicate-Rows-keeping-first-duplicate/m-p/717185#M89885</link>
      <description>&lt;P&gt;Here is a variation on&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/182"&gt;@ms&lt;/a&gt;&amp;nbsp;script that should do what you want&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; select where(Col Max(Row(), :a,:b, :c) &amp;gt; Row()) &amp;lt;&amp;lt; delete rows;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Jan 2024 04:22:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Eliminating-Duplicate-Rows-keeping-first-duplicate/m-p/717185#M89885</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-01-16T04:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: Eliminating Duplicate Rows (keeping first duplicate)</title>
      <link>https://community.jmp.com/t5/Discussions/Eliminating-Duplicate-Rows-keeping-first-duplicate/m-p/718055#M89987</link>
      <description>&lt;P&gt;Great! it works. Thank you, that's what I need.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,Chily&lt;/P&gt;</description>
      <pubDate>Sun, 21 Jan 2024 15:01:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Eliminating-Duplicate-Rows-keeping-first-duplicate/m-p/718055#M89987</guid>
      <dc:creator>Chily</dc:creator>
      <dc:date>2024-01-21T15:01:36Z</dc:date>
    </item>
  </channel>
</rss>

