title: Prolog - parsing a csv file
body: <p>I try to parse a csv file and extractd a specific coloumn data from each row, I've managed to parse the file to a list of records, but I cannot iterate over the fields of each of the records.
  Is their a way to parse the csv file using prolog so that each record of the csv file will itself be a list?</p>
  
  <p>My code:</p>
  
  <pre><code>:- use_module(library(csv)).
  
  % main function ,  first parse the file then extracts max total market  
  get_rows_data(File,Rows) :-
     csv_read_file(File, Rows, [functor(record), arity(18)]),
     maplist(assert, Rows),
     get_row(Rows).
  
  get_row([]).    
  get_row([Head|Tail]) :-
     write('*********************************'),write(Head),
     get_row(Tail). 
  </code></pre>