<?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: Summarize Columns that contain more than one unique value in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Summarize-Columns-that-contain-more-than-one-unique-value/m-p/829993#M101236</link>
    <description>&lt;P&gt;I don't really like "advertising" for my add-ins but maybe &lt;LI-MESSAGE title="Analyse Columns" uid="460329" url="https://community.jmp.com/t5/JMP-Add-Ins/Analyse-Columns/m-p/460329#U460329" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-tkb-thread lia-fa-icon lia-fa-tkb lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;could be helpful? I the public version should work (and work also with JMP17)). Simple script with a loop can also easily remove/exclude/hide/or whatever handle such columns.&lt;/P&gt;</description>
    <pubDate>Fri, 31 Jan 2025 15:51:36 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2025-01-31T15:51:36Z</dc:date>
    <item>
      <title>Summarize Columns that contain more than one unique value</title>
      <link>https://community.jmp.com/t5/Discussions/Summarize-Columns-that-contain-more-than-one-unique-value/m-p/829848#M101219</link>
      <description>&lt;P&gt;I have a data table and I want to summarize the columns that contain more than one unique value including missing rows.&amp;nbsp; The columns with all rows the same are boring and I want to look at the more interesting ones only.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2025 23:06:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Summarize-Columns-that-contain-more-than-one-unique-value/m-p/829848#M101219</guid>
      <dc:creator>SpannerHead</dc:creator>
      <dc:date>2025-01-30T23:06:10Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize Columns that contain more than one unique value</title>
      <link>https://community.jmp.com/t5/Discussions/Summarize-Columns-that-contain-more-than-one-unique-value/m-p/829877#M101221</link>
      <description>&lt;P&gt;There are several ways to do this, but I think the easiest is the following:&lt;/P&gt;
&lt;P&gt;Go to Cols &amp;gt; Column Manager&lt;/P&gt;
&lt;P&gt;The resulting table will have a column with N Unique that tells you how many unique items are in each column. It also will have a column with N Missing which tells you how many missing values are in that column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately, N Unique is not automatically calculated for continuous columns, but the red pop-up menu offers the option to Force the Calculation for all Numeric columns.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can also use that table to select columns with only one unique value. Those columns are then selected in the original table so you can hide and exclude them so you will not be forced to see those "non-interesting" columns.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2025 01:08:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Summarize-Columns-that-contain-more-than-one-unique-value/m-p/829877#M101221</guid>
      <dc:creator>Dan_Obermiller</dc:creator>
      <dc:date>2025-01-31T01:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize Columns that contain more than one unique value</title>
      <link>https://community.jmp.com/t5/Discussions/Summarize-Columns-that-contain-more-than-one-unique-value/m-p/829991#M101235</link>
      <description>&lt;P&gt;Luddite I am, JMP17 I'm afraid.&amp;nbsp; Thanks, I think I can script this just wondered if someone had already cracked it.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2025 15:36:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Summarize-Columns-that-contain-more-than-one-unique-value/m-p/829991#M101235</guid>
      <dc:creator>SpannerHead</dc:creator>
      <dc:date>2025-01-31T15:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize Columns that contain more than one unique value</title>
      <link>https://community.jmp.com/t5/Discussions/Summarize-Columns-that-contain-more-than-one-unique-value/m-p/829993#M101236</link>
      <description>&lt;P&gt;I don't really like "advertising" for my add-ins but maybe &lt;LI-MESSAGE title="Analyse Columns" uid="460329" url="https://community.jmp.com/t5/JMP-Add-Ins/Analyse-Columns/m-p/460329#U460329" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-tkb-thread lia-fa-icon lia-fa-tkb lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;could be helpful? I the public version should work (and work also with JMP17)). Simple script with a loop can also easily remove/exclude/hide/or whatever handle such columns.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jan 2025 15:51:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Summarize-Columns-that-contain-more-than-one-unique-value/m-p/829993#M101236</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-01-31T15:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize Columns that contain more than one unique value</title>
      <link>https://community.jmp.com/t5/Discussions/Summarize-Columns-that-contain-more-than-one-unique-value/m-p/830084#M101250</link>
      <description>&lt;P&gt;Nice Add In Jarmo!&amp;nbsp; I need to tinker around with that but it looks great.&amp;nbsp; Here's the script I came up with to summarize any column that has &amp;gt; 1 unique entry by wafer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt; 
dt = Current Data Table();
colList = Current Data Table() &amp;lt;&amp;lt; Get Column Names( String );

dcols = {};

For( i = 1, i &amp;lt;= N Items( colList ), i++,
	If( Contains( colList[i], " / " ),
		Insert Into( dcols, colList[i] )
	)
);
Show( dcols );

Split_Cols = {};
Insert Into( Split_Cols, :wafer );

For( j = 1, j &amp;lt;= N Items( dcols ), j++,
summarize(unique_values = by( Column(dcols[j]) ));
if (N Items(unique_values) &amp;gt; 1, Insert Into( Split_Cols, dcols[j] ) );		
);


Show(Split_cols);



Current Data Table() &amp;lt;&amp;lt; Summary(
	Group( Split_cols ),
	Freq( "None" ),
	Weight( "None" )
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 31 Jan 2025 21:49:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Summarize-Columns-that-contain-more-than-one-unique-value/m-p/830084#M101250</guid>
      <dc:creator>SpannerHead</dc:creator>
      <dc:date>2025-01-31T21:49:57Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize Columns that contain more than one unique value</title>
      <link>https://community.jmp.com/t5/Discussions/Summarize-Columns-that-contain-more-than-one-unique-value/m-p/830129#M101258</link>
      <description>&lt;P&gt;I suggest using&amp;nbsp; For Each, Filter Each and Transform Each over for loop most of the time as they are faster and easier to read. But they can be more annoying to debug and deal with due to their speed if there is an issue AND they do have one nasty bug/feature". Luckily that bug/"feature" isn't present in simple case such as this(&lt;LI-MESSAGE title="Issue with Function() default local and Each functions" uid="701264" url="https://community.jmp.com/t5/Discussions/Issue-with-Function-default-local-and-Each-functions/m-p/701264#U701264" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;). I'm not sure if you wanted to consider missing values as "valid" values so I did leave Remove From commented out inside the Filter Each loop&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Current Data Table();

collist = dt &amp;lt;&amp;lt; Get Column Names("String");

valid_cols = Filter Each({colname}, collist,
	Summarize(dt, vals = By(Eval(colname)));
	//Remove From(vals, Contains(vals, "")); // drop missing values if necessary
	N Items(vals) &amp;gt; 1;
);

dt_summary = dt &amp;lt;&amp;lt; Summary(
	Group(valid_cols),
	Freq("None"),
	Weight("None"),
	//Link to original data table(0),
	Output Table("Non-Unique Summary")
);

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Here is script to create simple demo table&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = New Table("demo",
	Compress File When Saved(1),
	New Column("Column 1", Character, "Nominal", Set Values({"a", "a", "a", "a"})),
	New Column("Column 2", Character, "Nominal", Set Values({"b", "b", "b", ""})),
	New Column("Column 3", Character, "Nominal", Set Values({"", "", "", ""})),
	New Column("Column 4", Character, "Nominal", Set Values({"c", "d", "", ""})),
	New Column("Column 5", Character, "Nominal", Set Values({"c", "d", "e", "f"}))
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That add-in was created before JMP had Columns manager and I still prefer it over Columns Manager most of the time. I assume they do have different use cases and Columns Manager tries to replace Columns Viewer platform with some nice extra features and Analyse Columns got its inspiration from &lt;A href="https://docs.profiling.ydata.ai/latest/" target="_self"&gt;pandas profiling (seems to be renamed to ydata profiling)&lt;/A&gt; as I had to be able to quickly check how my data looked like in terms of summary statistics.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 01 Feb 2025 06:32:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Summarize-Columns-that-contain-more-than-one-unique-value/m-p/830129#M101258</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-02-01T06:32:34Z</dc:date>
    </item>
  </channel>
</rss>

