- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Script import csv data (conversion of stdf)
Hi all,
I work with STDF files containing probe test informations, we already convert these files into csv file, I attached an example.
I would like to import easisly these files into JMP with a script.
The csv file to import to jmp sounds like:
info1, data1 |
info2,data2 |
info3, data3 |
info4,data4 |
info4,data5 |
etc |
etc |
infoN,dataN |
test1_name,test2_name,test3_name,...... |
test1_num,test2_num,test3_num,….. |
patt1,patt2,patt3,…. |
unit1,unit2,unit3 |
lowlimit1,lowlimit2,lowlimit3,…. |
highlimit1,highlimi2,highlimit3,… |
Data,data,data,.. |
Data,data,data,.. |
….... |
The script should generate a table like:
The script should generate a table in which colum names are: test1_name,test2_name etc, and data directely, so the lines (patt, unit, lowlimit, highlimit are not taken into account). Nice to add column names info1, info2, info3 all filled with same value (data1, data2, data3).
Thanks a lot for your help, suggestions. My Team is buying several JMP lecenses but we should need a script to import easily csv files (generated fro; stdf source files).
Thanks,
Vinc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Script import csv data (conversion of stdf)
This file does not seem to be a simple flat file using the CSV convention. Such a file would have a line with column names separated by a column (variables or fields) followed by separate lines with data in the same order for each observation or record (row). Your file has values separated by a comma but the header information and the data appear to be spread across many rows.
It is likely that a script would be required read the entire file as a character string, parse the string, and store the individual results in a new data table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Script import csv data (conversion of stdf)
Any kind of example to manage open files and organize data into table should be very helpful for me, I could take inspiration from them !!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Script import csv data (conversion of stdf)
This example illustrates one way you might convert the SDTF file into a JMP data table.
Names Default to Here( 1 );
// open data file
content = Load Text File( "path/filename.txt" );
// break data into separate lines collected as a list
content = Words( content, "\!n" );
// move past first block of information
item = 1;
While( Length( content[item] ) != 0, item++ );
// obtain test names as a list
item += 2;
name = Words( content[item], "," );
// make data table ready
dt = New Table( "STDF Data" );
For( item += 6; col = 1, col <= N Items( name ), item++; col++,
// obtain test data for this column
line = Words( content[item], "," );
data = List();
For( i = 1, i <= N Items( line ), i++,
Insert Into( data, Eval( Num( line[i] ) ) );
);
dt << New Column( name[col],
Values( data )
);
);
I based it on my understanding of the structure of the STDF file and the desired data table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Script import csv data (conversion of stdf)
Hi Vinc,
Somehow I missed your original question. You have probably resolved this long ago, but if you face the issue again, you can use the add-in QuickLoad-JMP designed specifically for loading data from STDF into JMP. You can see it at https://sprysoftware.net/quickload-jmp/ . It can load parametric results including limits and bin summaries.
thanks,
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Script import csv data (conversion of stdf)
Hi Vinc,
Even though it's an old topic, for the benefit of the forum I would like to add one more option. YieldOptiX from SilTest has a very powerful loader for all STDF files directly into JMP. And with just $9 per month, it is a very good option to explore.
Try it out - https://www.siltest.com/stdf-loader-for-jmp/
Cheers
Sam