<?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 detect all columns that are empty in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/detect-all-columns-that-are-empty/m-p/652994#M22487</link>
    <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am working with a very big dataset (more than 10k rows) and am trying to find all the columns that have no data in them. I ran a proc freq but is there a way to put all those columns that are completely empty into a list or a table?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jun 2020 20:50:56 GMT</pubDate>
    <dc:creator>marleeakerson</dc:creator>
    <dc:date>2020-06-03T20:50:56Z</dc:date>
    <item>
      <title>detect all columns that are empty</title>
      <link>https://communities.sas.com/t5/New-SAS-User/detect-all-columns-that-are-empty/m-p/652994#M22487</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am working with a very big dataset (more than 10k rows) and am trying to find all the columns that have no data in them. I ran a proc freq but is there a way to put all those columns that are completely empty into a list or a table?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 20:50:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/detect-all-columns-that-are-empty/m-p/652994#M22487</guid>
      <dc:creator>marleeakerson</dc:creator>
      <dc:date>2020-06-03T20:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: detect all columns that are empty</title>
      <link>https://communities.sas.com/t5/New-SAS-User/detect-all-columns-that-are-empty/m-p/653001#M22488</link>
      <description>&lt;P&gt;Have you tried any of the solutions found on here? There are several answered questions relating to this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Programming/deleting-empty-columns/m-p/308045" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/deleting-empty-columns/m-p/308045&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/New-SAS-User/Deleting-Variables-with-Only-Missing-Values-from-Dataset-with/m-p/494926" target="_blank"&gt;https://communities.sas.com/t5/New-SAS-User/Deleting-Variables-with-Only-Missing-Values-from-Dataset-with/m-p/494926&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Delete-quot-zero-columns-quot/m-p/164261" target="_blank"&gt;https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Delete-quot-zero-columns-quot/m-p/164261&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If none of those work, please indicate how your situation is different so we can help you find a customized solution.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/281255"&gt;@marleeakerson&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am working with a very big dataset (more than 10k rows) and am trying to find all the columns that have no data in them. I ran a proc freq but is there a way to put all those columns that are completely empty into a list or a table?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 21:07:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/detect-all-columns-that-are-empty/m-p/653001#M22488</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-06-03T21:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: detect all columns that are empty</title>
      <link>https://communities.sas.com/t5/New-SAS-User/detect-all-columns-that-are-empty/m-p/653002#M22489</link>
      <description>I have seen those but I am trying to find all the empty columns, not delete them, so I can compare them to another table I have. &lt;BR /&gt;&lt;BR /&gt;Thank you.</description>
      <pubDate>Wed, 03 Jun 2020 21:09:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/detect-all-columns-that-are-empty/m-p/653002#M22489</guid>
      <dc:creator>marleeakerson</dc:creator>
      <dc:date>2020-06-03T21:09:24Z</dc:date>
    </item>
    <item>
      <title>Re: detect all columns that are empty</title>
      <link>https://communities.sas.com/t5/New-SAS-User/detect-all-columns-that-are-empty/m-p/653005#M22490</link>
      <description>&lt;P&gt;You might try the option NLEVELS on proc freq with the ODS Select to restrict the output to that table only.&lt;/P&gt;
&lt;P&gt;Quick example:&lt;/P&gt;
&lt;PRE&gt;data example;
   input x y z q;
datalines;
1 . 3  .
2 2 2  .
3 . 3  .
;

ods select nlevels;
proc freq data=example nlevels;
run;&lt;/PRE&gt;
&lt;P&gt;The output only shows the "levels" information, which is number of different values.&lt;/P&gt;
&lt;P&gt;The key for your part is in the result for Q that shows Nonmissing levels of 0. That is what appears if a variable only has missing values.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 21:11:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/detect-all-columns-that-are-empty/m-p/653005#M22490</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-06-03T21:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: detect all columns that are empty</title>
      <link>https://communities.sas.com/t5/New-SAS-User/detect-all-columns-that-are-empty/m-p/653018#M22492</link>
      <description>&lt;P&gt;Then just don't drop them.&lt;/P&gt;
&lt;P&gt;You'll get a list of your variables this way for example, slightly modified from first link:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;

ods select none;
ods output nlevels=temp;
proc freq data=your_data nlevels;
 tables _all_;
run;
proc sql;
 select tablevar into : drop separated by ','
  from temp
   where NNonMissLevels=0;
   
quit;


%put &amp;amp;drop;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 03 Jun 2020 21:45:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/detect-all-columns-that-are-empty/m-p/653018#M22492</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-06-03T21:45:34Z</dc:date>
    </item>
    <item>
      <title>Re: detect all columns that are empty</title>
      <link>https://communities.sas.com/t5/New-SAS-User/detect-all-columns-that-are-empty/m-p/653177#M22503</link>
      <description>&lt;P&gt;Ha. Check paper of mine and&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.sas.com/content/dam/SAS/support/en/sas-global-forum-proceedings/2020/4737-2020.pdf" target="_blank"&gt;https://www.sas.com/content/dam/SAS/support/en/sas-global-forum-proceedings/2020/4737-2020.pdf&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 12:01:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/detect-all-columns-that-are-empty/m-p/653177#M22503</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2020-06-04T12:01:31Z</dc:date>
    </item>
  </channel>
</rss>

