To complement: being cool means having funny easy to understand examples that make you feel at ease and say of course, that’s obvious … and that is all the nice thing with Prolog which is a language based on rules …
Some examples from A feature upgrade that would be useful for csv_read_file/3 - Request For Comments - SWI-Prolog
In what i name “2 lines demo” = get the list of the CSV colums names.
In a more complete example : give the columns names (or column numbers) you want to extract and get a table only with those columns.