Skip to content
Snippets Groups Projects
Commit b359a9d7 authored by Leonard Kupper's avatar Leonard Kupper
Browse files

Return empty csv when transposing empty csv.

parent 9627adf8
No related branches found
No related tags found
2 merge requests!29Add horizontal parsing for x_aligned & x_aligned_category datasets via data transposition.,!28Bug/jar resource handling 49
......@@ -83,6 +83,9 @@ public abstract class CsvParseAlgorithm<T extends PointListContainer<PointList>>
*/
static <T> List<List<T>> transposeCSV(final List<? extends List<T>> csvData) {
List<List<T>> transposedCsvData = new ArrayList<>();
if (csvData.size() < 1) {
return new ArrayList<>();
}
final int columns = csvData.get(0).size();
for (int i = 0; i < columns; i++) {
List<T> col = new ArrayList<T>();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment