APISonar


smile.io.DatasetReader.csv

> smile > io > DatasetReader > csv
smile APIs io APIs DatasetReader APIs csv APIs

Example 1
private void loadData(int datasetIndex) {
        if (dataset[datasetIndex] != null) return;

        CSVFormat format = CSVFormat.DEFAULT.withDelimiter(delimiter[datasetIndex]).withIgnoreSurroundingSpaces(true);
        try {
            DataFrame data = DatasetReader.csv(smile.util.Paths.getTestData(datasource[datasetIndex]), format);
            dataset[datasetIndex] = data.toArray();
        } catch (Exception e) {
            JOptionPane.showMessageDialog(null, String.format("Failed to load dataset %s", datasetName[datasetIndex]), "ERROR", JOptionPane.ERROR_MESSAGE);
            System.err.println(e);
        }
    }