File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -35,20 +35,18 @@ const loadCsv = (filename: string, options: CsvReadOptions) => {
3535 } )
3636 ) ;
3737
38+ const mappedData = applyMappings ( data , mappings ) ;
39+
3840 const tables : { [ key : string ] : CsvTable } = {
39- labels : filterColumns ( data , labelColumns ) ,
40- features : filterColumns ( data , featureColumns ) ,
41+ labels : filterColumns ( mappedData , labelColumns ) ,
42+ features : filterColumns ( mappedData , featureColumns ) ,
4143 testFeatures : [ ] ,
4244 testLabels : [ ] ,
4345 } ;
4446
4547 tables . labels . shift ( ) ;
4648 tables . features . shift ( ) ;
4749
48- for ( const key of Object . keys ( tables ) ) {
49- tables [ key ] = applyMappings ( tables [ key ] , mappings ) ;
50- }
51-
5250 if ( shouldShuffle ) {
5351 const seed =
5452 typeof shouldShuffle === 'string' ? shouldShuffle : defaultShuffleSeed ;
You can’t perform that action at this time.
0 commit comments