<?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 How To remove rows on specific columns in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-To-remove-rows-on-specific-columns/m-p/482643#M72699</link>
    <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kuanaunwei_0-1651137050019.png" style="width: 673px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/42078i42AD587AAE76EBCD/image-dimensions/673x212?v=v2" width="673" height="212" role="button" title="kuanaunwei_0-1651137050019.png" alt="kuanaunwei_0-1651137050019.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The above table is just an example of my data set. I have 100k rows and 500+ columns. My question is how to remove the "aaa" rows&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jun 2023 00:48:33 GMT</pubDate>
    <dc:creator>kuanaunwei</dc:creator>
    <dc:date>2023-06-09T00:48:33Z</dc:date>
    <item>
      <title>How To remove rows on specific columns</title>
      <link>https://community.jmp.com/t5/Discussions/How-To-remove-rows-on-specific-columns/m-p/482643#M72699</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kuanaunwei_0-1651137050019.png" style="width: 673px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/42078i42AD587AAE76EBCD/image-dimensions/673x212?v=v2" width="673" height="212" role="button" title="kuanaunwei_0-1651137050019.png" alt="kuanaunwei_0-1651137050019.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The above table is just an example of my data set. I have 100k rows and 500+ columns. My question is how to remove the "aaa" rows&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 00:48:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-To-remove-rows-on-specific-columns/m-p/482643#M72699</guid>
      <dc:creator>kuanaunwei</dc:creator>
      <dc:date>2023-06-09T00:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: How To remove rows on specific columns</title>
      <link>https://community.jmp.com/t5/Discussions/How-To-remove-rows-on-specific-columns/m-p/482706#M72702</link>
      <description>&lt;P&gt;I am not sure what you want the final result to be.&amp;nbsp; If you want the resulting table to be:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1651145520765.png" style="width: 591px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/42081i46E4B99100FF8A49/image-dimensions/591x139?v=v2" width="591" height="139" role="button" title="txnelson_0-1651145520765.png" alt="txnelson_0-1651145520765.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();

// Get all of the column names
colNameList = dt &amp;lt;&amp;lt; get column names( string );

// Remove the first column name from the list
Remove From( colNameList, 1, 1 );

dt &amp;lt;&amp;lt; Begin Data Update;

// Loop across all columns in the list and recode them
For( i = 1, i &amp;lt;= N Items( colNameList ), i++,
	dt &amp;lt;&amp;lt; Recode Column(
		As Column( dt, colNameList[i] ),
		{Map Value( _rcOrig, {"aaa", " "}, Unmatched( _rcNow ) )},
		Update Properties( 1 ),
		Target Column( As Column( dt, colNameList[i] ) )
	)
);

dt &amp;lt;&amp;lt; End Data Update;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If the final result is&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_1-1651145633117.png" style="width: 1108px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/42082i4679D61BB5A29AE0/image-dimensions/1108x133?v=v2" width="1108" height="133" role="button" title="txnelson_1-1651145633117.png" alt="txnelson_1-1651145633117.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();

// Get all of the column names
colNameList = dt &amp;lt;&amp;lt; get column names( string );

// Remove the first column name from the list
Remove From( colNameList, 1, 1 );

// Loop across all columns in the list and find rows 
// that have aaa for that column
For( i = 1, i &amp;lt;= N Items( colNameList ), i++,
	dt &amp;lt;&amp;lt; select where(
		As Column( dt, colNameList[i] ) == "aaa",
		current selection( "extend" )
	)
);

// Delete all selected rows
dt &amp;lt;&amp;lt; delete rows;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;For future discussions where you provide an image of a data table, please insert it as a table and not as a picture of the table, or if possible attach the table.&amp;nbsp; This will remove the requirement of the responder to have to spend the time required to individually create the table(s).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 11:39:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-To-remove-rows-on-specific-columns/m-p/482706#M72702</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-04-28T11:39:06Z</dc:date>
    </item>
  </channel>
</rss>

