CSV.jl icon indicating copy to clipboard operation
CSV.jl copied to clipboard

Keywords to ignore leading and trailing delimiters

Open MagicMuscleMan opened this issue 5 months ago • 2 comments

Some files start and/or end their line with the delimiter as in

, a, b, c,
, d, e, f,

so that the keywords ignoreleadingdelim and ignoretrailingdelim would be useful.

Note, that the same can also be done with the drop keyword. However, this is more complicated, as these empty trailing columns do not have a predefined name typically and thus are auto-named. The name of the trailing column, however, depends on the number of columns and is therefore sometimes hard to know before reading the file and reading it (partially) twice is not efficient meaning the columns have to be removed afterwards which is not in the spirit of the other keywords to just read in the data as needed.

MagicMuscleMan avatar Jul 21 '25 08:07 MagicMuscleMan