We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7a03239 commit fed6380Copy full SHA for fed6380
src/loadCsv.ts
@@ -35,20 +35,18 @@ const loadCsv = (filename: string, options: CsvReadOptions) => {
35
})
36
);
37
38
+ const mappedData = applyMappings(data, mappings);
39
+
40
const tables: { [key: string]: CsvTable } = {
- labels: filterColumns(data, labelColumns),
- features: filterColumns(data, featureColumns),
41
+ labels: filterColumns(mappedData, labelColumns),
42
+ features: filterColumns(mappedData, featureColumns),
43
testFeatures: [],
44
testLabels: [],
45
};
46
47
tables.labels.shift();
48
tables.features.shift();
49
- for (const key of Object.keys(tables)) {
- tables[key] = applyMappings(tables[key], mappings);
50
- }
51
-
52
if (shouldShuffle) {
53
const seed =
54
typeof shouldShuffle === 'string' ? shouldShuffle : defaultShuffleSeed;
0 commit comments