Playing with standard libraries and csv_read_file/3 while comparing it to other programming languages … i feel that a feature that would be useful (as it valorizes the “intelligence” of Prolog) would be to add a filter in the options where you can add header names to filter the columns that you want to import in spite of just using the arity. Example of option: header(‘header_name_1’, ‘header_name_2’, ‘header_name_3’) to just get the columns using those names, whatever is their position in the CSV colums. What do you think about it ?
Talking about adding features to be standard because they are in the standard CSV library, i also feel that those other ones could make a nice extension: csv_headers(+File, -Headers) where Headers = [ ‘header_name_1’, ‘header_name_2’ ] etc. to preprocess the filtering or csv_check(+File, -Stats, +Options) to get statistics on the number of lines, empty cells, number of commented out lines, etc. csv_write_file_row(+File, +Row, +Data, +Options) to have a simple way to update a CSV file “on the fly” when some data is missing or corrupted.