<?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: find and drop duplicate rows in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/find-and-drop-duplicate-rows/m-p/372#M372</link>
    <description>&lt;P&gt;I'm sure there are many ways to do this depending on depending on the degree of interaction versus automation (scripting) you want.&lt;BR /&gt;&lt;BR /&gt;One interactive way I can think of is the use Tables:Summary and assign the 12 duped variables as grouping variables and no statistic. It will make a new table listing the number of occurrence of each 12-var combination. The new table is linked to the original, so if you select rows in the new table with NRows more that 1, you'll see dupes selected in the original.&lt;BR /&gt;&lt;BR /&gt;Doing with with Big Class on height and weight, for instance, reveals one duplicated combination: height=64, weight=99.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Data Table( "Big Class" ) &amp;lt;&amp;lt; Summary( Group( :height, :weight ) )&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 04 Oct 2017 20:03:50 GMT</pubDate>
    <dc:creator>XanGregg</dc:creator>
    <dc:date>2017-10-04T20:03:50Z</dc:date>
    <item>
      <title>find and drop duplicate rows</title>
      <link>https://community.jmp.com/t5/Discussions/find-and-drop-duplicate-rows/m-p/370#M370</link>
      <description>I have 2462 rows by 13 columns.  Some of these rows contain duplicate values in 12 of the 13 columns.  The column that always contains unique text is called PK.SAMPLE.  How can I find these rows of almost exact duplicates and remove them from the data set?&lt;BR /&gt;Thanks,&lt;BR /&gt;mgm</description>
      <pubDate>Wed, 08 Apr 2009 20:05:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/find-and-drop-duplicate-rows/m-p/370#M370</guid>
      <dc:creator />
      <dc:date>2009-04-08T20:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: find and drop duplicate rows</title>
      <link>https://community.jmp.com/t5/Discussions/find-and-drop-duplicate-rows/m-p/371#M371</link>
      <description>Did the search function not work?  Alternatively, you can select the data you want to ignore, right click in the far left column and then choose to exclude the data from your analysis.</description>
      <pubDate>Fri, 10 Apr 2009 14:25:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/find-and-drop-duplicate-rows/m-p/371#M371</guid>
      <dc:creator>sidewinder</dc:creator>
      <dc:date>2009-04-10T14:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: find and drop duplicate rows</title>
      <link>https://community.jmp.com/t5/Discussions/find-and-drop-duplicate-rows/m-p/372#M372</link>
      <description>&lt;P&gt;I'm sure there are many ways to do this depending on depending on the degree of interaction versus automation (scripting) you want.&lt;BR /&gt;&lt;BR /&gt;One interactive way I can think of is the use Tables:Summary and assign the 12 duped variables as grouping variables and no statistic. It will make a new table listing the number of occurrence of each 12-var combination. The new table is linked to the original, so if you select rows in the new table with NRows more that 1, you'll see dupes selected in the original.&lt;BR /&gt;&lt;BR /&gt;Doing with with Big Class on height and weight, for instance, reveals one duplicated combination: height=64, weight=99.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Data Table( "Big Class" ) &amp;lt;&amp;lt; Summary( Group( :height, :weight ) )&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Oct 2017 20:03:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/find-and-drop-duplicate-rows/m-p/372#M372</guid>
      <dc:creator>XanGregg</dc:creator>
      <dc:date>2017-10-04T20:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: find and drop duplicate rows</title>
      <link>https://community.jmp.com/t5/Discussions/find-and-drop-duplicate-rows/m-p/373#M373</link>
      <description>&lt;P&gt;I wrote a script recently to check to make sure I wasn't adding duplicate rows to a data table. Maybe this will help.&lt;BR /&gt;&lt;BR /&gt;The script iterates through all the rows in the table (i counter) and each of my 9 columns (k counter) comparing the values to those in the last row. If it finds any rows that are equal, it will delete the last row.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; CurrentDataTable;
TotalRows = NRows(dt);
eqFlag = 1;
deleteFlag = 0;

For(i=1, i&amp;lt;TotalRows,i++,
For(k =1, k &amp;lt;=9,k++,
If(Column(dt,k)sqbrack i sqbrack !=Column(dt,k)[TotalRows], eqFlag=0)
);
If(eqFlag == 1, deleteFlag = 1);
eqFlag = 1;
);

If(deleteFlag==1,dt&amp;lt;&amp;lt;SelectRows(TotalRows); dt&amp;lt;&amp;lt;Delete Rows);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Oct 2017 20:05:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/find-and-drop-duplicate-rows/m-p/373#M373</guid>
      <dc:creator />
      <dc:date>2017-10-04T20:05:30Z</dc:date>
    </item>
    <item>
      <title>Re: find and drop duplicate rows</title>
      <link>https://community.jmp.com/t5/Discussions/find-and-drop-duplicate-rows/m-p/257224#M50544</link>
      <description>&lt;P&gt;Excel has a one-button "Remove Duplicates"&lt;/P&gt;&lt;P&gt;Pandas has a one-liner drop_duplicates&amp;nbsp;&lt;A href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.drop_duplicates.html" target="_blank"&gt;https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.drop_duplicates.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;We really have to write a loop and check every value ourselves?&lt;/P&gt;</description>
      <pubDate>Fri, 10 Apr 2020 04:15:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/find-and-drop-duplicate-rows/m-p/257224#M50544</guid>
      <dc:creator>bayesfactor</dc:creator>
      <dc:date>2020-04-10T04:15:22Z</dc:date>
    </item>
    <item>
      <title>Re: find and drop duplicate rows</title>
      <link>https://community.jmp.com/t5/Discussions/find-and-drop-duplicate-rows/m-p/257225#M50545</link>
      <description>&lt;P&gt;There is a function called Select Duplicate Rows() in JSL, or it can be used interactively under the pull down menus&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; Rows==&amp;gt;Row Selection==&amp;gt;Select Duplicate Rows&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Apr 2020 04:39:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/find-and-drop-duplicate-rows/m-p/257225#M50545</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-04-10T04:39:53Z</dc:date>
    </item>
  </channel>
</rss>

