<?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: Merge CSV  in JMP 13 in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Merge-CSV-in-JMP-13/m-p/57081#M32023</link>
    <description>&lt;P&gt;JMP 14 has Multiple File Import. It is designed to load files from a directory and combine similar files (same columns, names). It can load text files into a data table for text explorer, or CSV files into a table using CSV options for headers and skipping some rows.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Choosing files from a directory" style="width: 878px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/10746i75E6D85C5940E154/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Choosing files from a directory" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Choosing files from a directory&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CSV options" style="width: 590px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/10747i452DB5182B581E16/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture1.PNG" alt="CSV options" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;CSV options&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 16 May 2018 11:52:12 GMT</pubDate>
    <dc:creator>Craige_Hales</dc:creator>
    <dc:date>2018-05-16T11:52:12Z</dc:date>
    <item>
      <title>Merge CSV  in JMP 13</title>
      <link>https://community.jmp.com/t5/Discussions/Merge-CSV-in-JMP-13/m-p/57037#M31991</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I like to merge few CSV files in a given directory. The files are similar format but also like to skip few lines after the headers and keep just the header for the first file. Once the files are merged, I can do the analysis on the merged file. I checked the JMP community, and did not find the best solution. I appreciate your help in providing me a script that do this. Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2018 16:49:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Merge-CSV-in-JMP-13/m-p/57037#M31991</guid>
      <dc:creator>AT</dc:creator>
      <dc:date>2018-05-15T16:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: Merge CSV  in JMP 13</title>
      <link>https://community.jmp.com/t5/Discussions/Merge-CSV-in-JMP-13/m-p/57038#M31992</link>
      <description>&lt;P&gt;The only way that I see to be able to do this is the following:&lt;/P&gt;
&lt;P&gt;1. Read in each of the CSV files.&lt;/P&gt;
&lt;P&gt;2. Delete the records after each of the headers that you do not want.&lt;/P&gt;
&lt;P&gt;3. Change the names in data table 2 thru N to match the names in the the first data table you want to match to.&lt;/P&gt;
&lt;P&gt;4. Concatinate the tables together.&lt;/P&gt;
&lt;P&gt;5. Save the concatinated file back as a CSV file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A pretty simple, but laborious, given the data table changes you may need to do.&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2018 17:29:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Merge-CSV-in-JMP-13/m-p/57038#M31992</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-05-15T17:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: Merge CSV  in JMP 13</title>
      <link>https://community.jmp.com/t5/Discussions/Merge-CSV-in-JMP-13/m-p/57042#M31996</link>
      <description>&lt;P&gt;Thanks. I was able to merge csv now. Now&amp;nbsp; I need to delete rows where for instance "Coulmn 2" is blank. I used the following and did not work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dt = Current data table():&lt;/P&gt;&lt;P&gt;dt &amp;lt;&amp;lt; select rows(:Column 2 == "");&lt;/P&gt;&lt;P&gt;&amp;nbsp;It only selects one row not all of them that are blank. I am using JMP 13 for this. Please help. Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2018 18:56:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Merge-CSV-in-JMP-13/m-p/57042#M31996</guid>
      <dc:creator>AT</dc:creator>
      <dc:date>2018-05-15T18:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: Merge CSV  in JMP 13</title>
      <link>https://community.jmp.com/t5/Discussions/Merge-CSV-in-JMP-13/m-p/57043#M31997</link>
      <description>&lt;P&gt;Select Rows selects the rows by row number.&amp;nbsp; What you need to use is&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;dt &amp;lt;&amp;lt; Select Where( :Column 2 == "" );&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2018 19:06:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Merge-CSV-in-JMP-13/m-p/57043#M31997</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-05-15T19:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: Merge CSV  in JMP 13</title>
      <link>https://community.jmp.com/t5/Discussions/Merge-CSV-in-JMP-13/m-p/57048#M32000</link>
      <description>&lt;P&gt;Thanks. That works. Now I wanted to go through each row of the table and delete where Column 2 = "ABC" except the first row.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dt = Current data table();&lt;/P&gt;&lt;P&gt;N = N Rows (dt);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For (i= 2, i &amp;lt;= N, i++,&lt;BR /&gt;dt &amp;lt;&amp;lt; select Where (:Column 2 == "ABC");&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;It selected all the rows where Column 2 = "ABC". I wanted to keep the first row not to be selected. Thanks for your continuous suppport.&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2018 19:40:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Merge-CSV-in-JMP-13/m-p/57048#M32000</guid>
      <dc:creator>AT</dc:creator>
      <dc:date>2018-05-15T19:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: Merge CSV  in JMP 13</title>
      <link>https://community.jmp.com/t5/Discussions/Merge-CSV-in-JMP-13/m-p/57049#M32001</link>
      <description>&lt;P&gt;This code should do the trick.&amp;nbsp; Uses &lt;STRONG&gt;GET ROWS WHERE&lt;/STRONG&gt; instead of &lt;STRONG&gt;SELECT WHERE&lt;/STRONG&gt;.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = New Table( "Test", Add Rows( 5 ),
	New Column( "Column 2", Character, "Nominal",
		Set Values( {"ABC", "ABC", "DEF", "DEF", "ABC"} )
	)
);
abc_rows = dt &amp;lt;&amp;lt; get rows where(:Column 2 == "ABC");
nr = nrows(abc_rows); 
if (nr &amp;gt; 1,
	abc_new = abc_rows[2::nr];
	dt &amp;lt;&amp;lt; delete rows(abc_new);
);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 15 May 2018 19:57:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Merge-CSV-in-JMP-13/m-p/57049#M32001</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2018-05-15T19:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: Merge CSV  in JMP 13</title>
      <link>https://community.jmp.com/t5/Discussions/Merge-CSV-in-JMP-13/m-p/57050#M32002</link>
      <description>&lt;P&gt;Thanks. It works perfectly. The last thing I wanted to do is to set column names the same as first row value and then delete the first row.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2018 20:26:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Merge-CSV-in-JMP-13/m-p/57050#M32002</guid>
      <dc:creator>AT</dc:creator>
      <dc:date>2018-05-15T20:26:28Z</dc:date>
    </item>
    <item>
      <title>Re: Merge CSV  in JMP 13</title>
      <link>https://community.jmp.com/t5/Discussions/Merge-CSV-in-JMP-13/m-p/57076#M32021</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = New Table( "Untitled", Add Rows( 4 ),
	New Column( "Column 1", Character, "Nominal",
		Set Values( {"abc", "1", "2", "3"} ) ),
	New Column( "Column 2", Character, "Nominal",
		Set Values( {"def", "6", "5", "4"} ) ),
	New Column( "Column 3", Character, "Nominal",
		Set Values( {"ghi", "7", "6", "5"} ) ),
	New Column( "Column 4", Character, "Nominal",
		Set Values( {"jkl", "2", "3", "4"} ) )
);
// Rename each column to the first row
for (i = 1, i &amp;lt;= ncols(dt), i++,
	column(i) &amp;lt;&amp;lt; set name(column(i)[1]);
);
// Remove the first row
dt &amp;lt;&amp;lt; delete rows([1]);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 May 2018 11:23:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Merge-CSV-in-JMP-13/m-p/57076#M32021</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2018-05-16T11:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: Merge CSV  in JMP 13</title>
      <link>https://community.jmp.com/t5/Discussions/Merge-CSV-in-JMP-13/m-p/57081#M32023</link>
      <description>&lt;P&gt;JMP 14 has Multiple File Import. It is designed to load files from a directory and combine similar files (same columns, names). It can load text files into a data table for text explorer, or CSV files into a table using CSV options for headers and skipping some rows.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Choosing files from a directory" style="width: 878px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/10746i75E6D85C5940E154/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Choosing files from a directory" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Choosing files from a directory&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CSV options" style="width: 590px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/10747i452DB5182B581E16/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture1.PNG" alt="CSV options" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;CSV options&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 11:52:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Merge-CSV-in-JMP-13/m-p/57081#M32023</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2018-05-16T11:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: Merge CSV  in JMP 13</title>
      <link>https://community.jmp.com/t5/Discussions/Merge-CSV-in-JMP-13/m-p/57095#M32026</link>
      <description>&lt;P&gt;Thanks. I tried yours as well and works fine.&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 16:56:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Merge-CSV-in-JMP-13/m-p/57095#M32026</guid>
      <dc:creator>AT</dc:creator>
      <dc:date>2018-05-16T16:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: Merge CSV  in JMP 13</title>
      <link>https://community.jmp.com/t5/Discussions/Merge-CSV-in-JMP-13/m-p/57096#M32027</link>
      <description>&lt;P&gt;Thanks. I am trying to make csv merge for JMP13 and it is great to hear that JMP14 can handle this. It is time to upgrade!!&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 16:57:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Merge-CSV-in-JMP-13/m-p/57096#M32027</guid>
      <dc:creator>AT</dc:creator>
      <dc:date>2018-05-16T16:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: Merge CSV  in JMP 13</title>
      <link>https://community.jmp.com/t5/Discussions/Merge-CSV-in-JMP-13/m-p/57102#M32030</link>
      <description>&lt;P&gt;Thanks all for your great support. I also like to be able to pick the directory and select individual csv files instead of slecting all csv files in the directory. I am using the script written by Byron (JMP) and have attached here. It works perfectly but if someone can help me to be able to select individual csv files, that would be very helpful. Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 18:41:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Merge-CSV-in-JMP-13/m-p/57102#M32030</guid>
      <dc:creator>AT</dc:creator>
      <dc:date>2018-05-16T18:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: Merge CSV  in JMP 13</title>
      <link>https://community.jmp.com/t5/Discussions/Merge-CSV-in-JMP-13/m-p/57104#M32032</link>
      <description>&lt;P&gt;In the Scripting Index you will find the definition and an example of using Pick File().&amp;nbsp; This will allow you to select files.&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 18:46:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Merge-CSV-in-JMP-13/m-p/57104#M32032</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-05-16T18:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: Merge CSV  in JMP 13</title>
      <link>https://community.jmp.com/t5/Discussions/Merge-CSV-in-JMP-13/m-p/57116#M32038</link>
      <description>&lt;P&gt;Thanks Jim. I used Pick File() but I need the file names only not the fullpath/file name information. Is there a way to get file name instead?&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;prefilelist = Pick File(
"Select JMP File",
"",
{"JMP Files|jmp;jsl;csv", "All Files|*"},
1,
0,
"",
multiple // save flag is 0, allows multiple file selection
);

show(prefilelist);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for continuous support.&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 21:59:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Merge-CSV-in-JMP-13/m-p/57116#M32038</guid>
      <dc:creator>AT</dc:creator>
      <dc:date>2018-05-16T21:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: Merge CSV  in JMP 13</title>
      <link>https://community.jmp.com/t5/Discussions/Merge-CSV-in-JMP-13/m-p/57117#M32039</link>
      <description>&lt;P&gt;1. I very strongly suggest that you read the Scripting Guide......you need to get a review of the different items available in JSL.......&lt;/P&gt;
&lt;P&gt;The solution to what you requested is to simply strip off the filename from the end of the complete path.&amp;nbsp; In JSL, there are all kinds of character handling functions.&amp;nbsp; See:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Help==&amp;gt;Scripting Index==&amp;gt;Functions==&amp;gt;Character&lt;/P&gt;
&lt;P&gt;Specifically, you need to use the Word() function&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;completefilename = "/C:/Users/txjim/Parameter Ranking/Parameter Ranking_v8 with private.jsl";
filename = Word( -1, completefilename, "/" );&lt;BR /&gt;show( filename );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;filename has the value,&amp;nbsp;"Parameter Ranking_v8 with private.jsl"&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 22:06:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Merge-CSV-in-JMP-13/m-p/57117#M32039</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-05-16T22:06:05Z</dc:date>
    </item>
    <item>
      <title>Re: Merge CSV  in JMP 13</title>
      <link>https://community.jmp.com/t5/Discussions/Merge-CSV-in-JMP-13/m-p/57118#M32040</link>
      <description>&lt;P&gt;Thanks Jim. I was reading mostly on Pick File() and thought there is a way to do that. I will try your suggestion and let you know. Thanks again.&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 22:22:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Merge-CSV-in-JMP-13/m-p/57118#M32040</guid>
      <dc:creator>AT</dc:creator>
      <dc:date>2018-05-16T22:22:10Z</dc:date>
    </item>
    <item>
      <title>Re: Merge CSV  in JMP 13</title>
      <link>https://community.jmp.com/t5/Discussions/Merge-CSV-in-JMP-13/m-p/57121#M32042</link>
      <description>&lt;P&gt;Thanks Jim. I was able to get it to work using Word() function. Thanks for all your support.&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 23:05:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Merge-CSV-in-JMP-13/m-p/57121#M32042</guid>
      <dc:creator>AT</dc:creator>
      <dc:date>2018-05-16T23:05:16Z</dc:date>
    </item>
  </channel>
</rss>

