let to_file file t = let print cout = fprintf cout "%s\n" (String.concat ~sep:"\t" col_names); List.iter ~f:(fun x -> fprintf cout "%s\n" (row_to_string x)) t in Out_channel.with_file file ~f:print