I have a script that parses csv files with different column headings. Some have categorical values which need to remain as categorical, whilst other columns contain categorical values but need to be changed into continuous numeric (e.g. columns A, B, C, D in the example below). Is it possible to write a JSL script that executes the script below regardless of the column name?
Not sure how feasible this is - Maybe asking the user to select which columns to change to numeric values? Or import the column names from a list written in another file?
Local( {old dt = Current Data Table()},
Current Data Table( dt_split);
For Each( {col, index},
<STRONG>{:'A'n, :'B'n, :'C'n, :'D'n,}</STRONG>
col << Data Type( Numeric ) << Set Modeling Type( "Continuous" ) <<
Set Field Width( 12 )
);
Current Data Table( old dt );
);