Bonjour à tous!
Il existe de nombreux fichiers de données dans le chemin C: \ 1. Ils ont la même structure de nom de colonne avec 50 colonnes.Comment utiliser l'implémentation JSL pour combiner les données des colonnes 3 et 5 de ces fichiers dans un nouveau tableau de données.
Paramètre: le format du type de données de la colonne 3 est Caractère et le format du type de données de la colonne 5 est numérique.
Comme Big class.jmp, mais avec 50 colonnes.
Merci!

Voici un bon début pour faire ce que vous voulez ... Soyez prudent, étant donné les paramètres que vous avez définis pour les tables que vous allez lire, la table finale aura 600 000 000 lignes de long. Le traitement de cette quantité de données prendra beaucoup de temps.
Names Default To Here( 1 );
// Set the path to the folder to get the files from
// Make sure a "/" is the last character in the path
// Change the value below to the actual path you need to point to
dirPath = "$SAMPLE_DATA/";
// Get all of the files from the folder
allFilesList = Files In Directory( dirPath );
// set the pointer to the final data table to a null value
dt = "";
// Loop across all of the files and concatenate them together
For( i = 1, i <= N Items( allFilesList ), i++,
// Open the file
dtIn = Open( dirPath || allFilesList[i], invisible );
dtIn << run formulas; // make sure all records are run before continuing the process
// In my test case, I make sure there are at least the 5 columns
If( N Cols( dtIn ) >= 5,
// Make sure the 3rd and 5th columns are of the correct type, and give them a standard name
Column( dtIn, 3 ) << data type( character ) << set name( "__3__" );
Try( Column( dtIn, 3 ) << delete property( "formula" ) );
Column( dtIn, 5 ) << data type( numeric ) << modeling type( continuous ) << set name( "__5__" );
Try( Column( dtIn, 3 ) << delete property( "formula" ) );
Wait( 0 );
// Delete all columns except the 3rd and 5th columns
dtIn << delete columns( Index( 6, N Cols( dtIn ) ) );
Wait( 0 );
dtIn << delete columns( 4 );
Wait( 0 );
dtIn << delete columns( {1, 2} );
Wait( 0 );
// If this is the first data table, set the variable dt to point to the data table
If( dt == "",
dt = dtIn,
// If not the first data table, then contatenate it to the first table
Try( dt = dt << concatenate( dtIn, Append to first table( 1 ) ) );
// Close the table just read into JMP since we are done with it
Close( dtIn, nosave );
// This is a check I found I needed to make to insure only the 3rd and 5th columns are left
If( Ncol(dt)>2,
dt<<DELETE columns=""></DELETE>Merci Jim!
J'utilise le JMP pro 14.
Je veux le faire en un script.
Il existe plus de 3 000 fichiers, chacun comportant plus de 200 000 lignes et 50 colonnes.
Les détails dépendront des spécificités de votre cas d'utilisation. Mais je commencerais par passer en revue ce que import de plusieurs fichiers peut faire (nécessite JMP 14).