I am writing data from one csv file to other but I want to append a new column to the destination file, Note that the data of the that column stored in a list, This The function I worked on, I want to add the appending step
private void writeDataToCSVDestinationFile(Path csvPath, Path destPath, String colToNormalize) throws IOException, CsvException {
CSVWriter writer = new CSVWriter(new FileWriter(destPath.toString()));
CSVReader reader = new CSVReader(new FileReader(csvPath.toString()));
List<String[]> rows = new ArrayList<>();
rows= reader.readAll();
}
And the data of the column stored in this list:
public static List<BigDecimal> dataAfterNormalization = new ArrayList<>();
Please I need a help to do that