Skip to content

Commit

Permalink
write csvs with ; as separator
Browse files Browse the repository at this point in the history
  • Loading branch information
simei94 committed Aug 29, 2024
1 parent ae90f7c commit f75f0a2
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/main/java/org/matsim/dashboard/AdaptV2OutputFiles.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import tech.tablesaw.api.IntColumn;
import tech.tablesaw.api.Table;
import tech.tablesaw.io.csv.CsvReadOptions;
import tech.tablesaw.io.csv.CsvWriteOptions;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
Expand Down Expand Up @@ -126,9 +127,11 @@ public Integer call() throws Exception {

DoubleColumn totalServiceDuration = DoubleColumn.create("totalServiceDuration", values);
vehicleStats.addColumns(totalServiceDuration);

vehicleStats.write().csv(vehicleStatsFile);
}

vehicleStats.write().csv(CsvWriteOptions.builder(vehicleStatsFile)
.separator(';')
.build());
});

// add rides_pax and dummy groupSize_mean columns to customer stats file
Expand All @@ -155,9 +158,11 @@ public Integer call() throws Exception {
Arrays.fill(defaultValues, -1);
DoubleColumn groupSizeMean = DoubleColumn.create("groupSize_mean", defaultValues);
customerStats.addColumns(groupSizeMean);

customerStats.write().csv(customerStatsFile);
}

customerStats.write().csv(CsvWriteOptions.builder(customerStatsFile)
.separator(';')
.build());
});

return 0;
Expand Down

0 comments on commit f75f0a2

Please sign in to comment.