From f75f0a29f81de5297de313471e6473e63202a49f Mon Sep 17 00:00:00 2001 From: sime94 Date: Thu, 29 Aug 2024 15:00:10 +0200 Subject: [PATCH] write csvs with ; as separator --- .../org/matsim/dashboard/AdaptV2OutputFiles.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/matsim/dashboard/AdaptV2OutputFiles.java b/src/main/java/org/matsim/dashboard/AdaptV2OutputFiles.java index ecffae3..b2e2016 100644 --- a/src/main/java/org/matsim/dashboard/AdaptV2OutputFiles.java +++ b/src/main/java/org/matsim/dashboard/AdaptV2OutputFiles.java @@ -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; @@ -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 @@ -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;