<?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: Looking for JSL Scripting suggestions on how to import a .CSV file with multiple embedded headers. in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Looking-for-JSL-Scripting-suggestions-on-how-to-import-a-CSV/m-p/822436#M100212</link>
    <description>&lt;P&gt;Someone will probably have a better solution, but the way I have approached this in the past, is that I read in the .csv file as one column per line.&lt;/P&gt;
&lt;P&gt;Then&amp;nbsp; find and delete all of the embedded header line.&lt;/P&gt;
&lt;P&gt;Save the modified table to a temporary .csv file&lt;/P&gt;
&lt;P&gt;and then read the .csv file back in, specifying line 1 as the headers&lt;/P&gt;</description>
    <pubDate>Fri, 13 Dec 2024 01:20:47 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2024-12-13T01:20:47Z</dc:date>
    <item>
      <title>Looking for JSL Scripting suggestions on how to import a .CSV file with multiple embedded headers.</title>
      <link>https://community.jmp.com/t5/Discussions/Looking-for-JSL-Scripting-suggestions-on-how-to-import-a-CSV/m-p/822422#M100207</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm creating a JMP JSL script to import a specific format of .CSV and graph the data.&amp;nbsp; The problem I have is that the .CSV has header lines interspersed with the data.&amp;nbsp; Think of it as multiple CSV's concatenated together.&amp;nbsp; The good news is that all of the column names are the same.&amp;nbsp; What is the recommendation on how to import this type of CSV and remove the extra headers?&amp;nbsp; Is there a way to remove these rows during import?&amp;nbsp; The lines can also be removed with a RowSelection and DeleteRows after import.&amp;nbsp; The problem with the RowSelection/DeleteRows method is that the data types for all the columns are set to Nominal (String data type) during import.&amp;nbsp; I would prefer not to have to then specifically name all of the columns (&amp;gt; 100) that need to be numeric.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using JMP version 18 on Windows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is the best practice for something like this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--Jeff&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Dec 2024 23:23:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Looking-for-JSL-Scripting-suggestions-on-how-to-import-a-CSV/m-p/822422#M100207</guid>
      <dc:creator>JeffScripter</dc:creator>
      <dc:date>2024-12-12T23:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for JSL Scripting suggestions on how to import a .CSV file with multiple embedded headers.</title>
      <link>https://community.jmp.com/t5/Discussions/Looking-for-JSL-Scripting-suggestions-on-how-to-import-a-CSV/m-p/822436#M100212</link>
      <description>&lt;P&gt;Someone will probably have a better solution, but the way I have approached this in the past, is that I read in the .csv file as one column per line.&lt;/P&gt;
&lt;P&gt;Then&amp;nbsp; find and delete all of the embedded header line.&lt;/P&gt;
&lt;P&gt;Save the modified table to a temporary .csv file&lt;/P&gt;
&lt;P&gt;and then read the .csv file back in, specifying line 1 as the headers&lt;/P&gt;</description>
      <pubDate>Fri, 13 Dec 2024 01:20:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Looking-for-JSL-Scripting-suggestions-on-how-to-import-a-CSV/m-p/822436#M100212</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-12-13T01:20:47Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for JSL Scripting suggestions on how to import a .CSV file with multiple embedded headers.</title>
      <link>https://community.jmp.com/t5/Discussions/Looking-for-JSL-Scripting-suggestions-on-how-to-import-a-CSV/m-p/822450#M100216</link>
      <description>&lt;P&gt;Usually you have two options:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Handle it as text&lt;/LI&gt;
&lt;LI&gt;Or handle it as JMP table&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Both will have the same idea: remove the extra lines to build final table. If your data has good quality otherwise and it is loaded nicely to JMP, I would first try to handle it as a table and just remove the extra rows and then fix column data/modelling types (you can perform a check to see what they should be).&amp;nbsp;If you can provide small example, we can give proper examples.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;LI-MESSAGE title="Scripters Club 2024: Session 2 - Preparing Unstructured Incoming Data for Analysis" uid="725042" url="https://community.jmp.com/t5/JMP-Scripters-Club-Discussions/Scripters-Club-2024-Session-2-Preparing-Unstructured-Incoming/m-p/725042#U725042" 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;might also give some ideas and it might even cover case like this.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Dec 2024 06:20:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Looking-for-JSL-Scripting-suggestions-on-how-to-import-a-CSV/m-p/822450#M100216</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-12-13T06:20:08Z</dc:date>
    </item>
  </channel>
</rss>

