proc csv2list(csv_file_path: string; columns: Natural = 32767;
separator: char = ','; quote: char = '\"'; escape: char = '\x00'): seq[
string] {.noinit, ...raises: [IOError, OSError, Exception],
tags: [ReadIOEffect, WriteIOEffect].}
-
Stream Read CSV to a list of strings.
proc csv2dict(csv_file_path: string; columns: Natural = 32767;
separator: char = ','; quote: char = '\"'; escape: char = '\x00'): seq[
Table[string, string]] {....raises: [IOError, OSError, Exception],
tags: [ReadIOEffect, WriteIOEffect].}
-
Stream Read CSV to a list of dictionaries. This is very similar to pandas.read_csv(filename).
proc read_clipboard(columns: Natural = 32767; has_header: bool = true;
separator: char = ','; quote: char = '\"';
escape: char = '\x00'): seq[(string, string)] {.
...raises: [OSError, Exception, IOError],
tags: [ExecIOEffect, ReadIOEffect, RootEffect, WriteIOEffect].}
-
Stream Read CSV to a list of dictionaries. This is very similar to pandas.read_clipboard().
proc url2csv(url: string; columns: Natural = 32767; separator: char = ',';
quote: char = '\"'; escape: char = '\x00';
agent: string = defUserAgent; maxRedirects: int = 5;
timeout: int = -1; http_method: string = "GET"; body: string = ""): seq[
(string, string)] {....raises: [Exception, LibraryError, SslError, IOError,
OSError, ValueError, HttpRequestError,
TimeoutError, ProtocolError, KeyError], tags: [
RootEffect, ReadDirEffect, ReadIOEffect, WriteIOEffect, TimeEffect].}
-
Stream Read URL to CSV to a list of dictionaries. This is very similar to pandas.read_csv(url).
proc csv2json(csv_string: string; separator: char = ','; nl: char = '\n'): string {.
...raises: [KeyError, ValueError], tags: [].}
-
CSV string to JSON string Pretty-printed.
proc csv2ndjson(csv_file_path, ndjson_file_path: string;
columns: Natural = 32767; separator: char = ',';
quote: char = '\"'; escape: char = '\x00') {.discardable,
...raises: [IOError, OSError, Exception], tags: [ReadIOEffect, WriteIOEffect].}
-
Stream Read CSV to NDJSON https://github.com/ndjson/ndjson-spec
proc csv2htmltable(csv_file_path, html_file_path: string = "";
columns: Natural = 32767; separator: char = ',';
quote: char = '\"'; escape: char = '\x00';
header_html: string = html_table_header): string {.noinit,
...raises: [IOError, OSError, Exception], tags: [ReadIOEffect, WriteIOEffect].}
-
Stream Read CSV to HTML Table file and string.
proc csv2markdowntable(csv_file_path, md_file_path: string = "";
separator: char = ','; quote: char = '\"';
escape: char = '\x00'; columns: Natural = 32767): string {.
...raises: [IOError, OSError, Exception], tags: [ReadIOEffect, WriteIOEffect].}
-
CSV to MarkDown Table file and string.
proc csv2terminal(csv_file_path: string; column_width: Natural;
columns: Natural = 32767; separator: char = ',';
quote: char = '\"'; escape: char = '\x00') {.
...raises: [IOError, OSError, ValueError, Exception],
tags: [ReadIOEffect, WriteIOEffect].}
-
CSV to pretty-printed colored terminal table.
proc csv2karax(csv_file_path: string = ""; columns: Natural = 32767;
separator: char = ','; quote: char = '\"'; escape: char = '\x00'): string {.
noinit, ...raises: [IOError, OSError, Exception],
tags: [ReadIOEffect, WriteIOEffect].}
-
CSV to Karax HTML Table.
proc csv2xml(csv_file_path: string; columns: Natural = 32767;
separator: char = ','; quote: char = '\"'; escape: char = '\x00';
header_xml: string = xmlHeader): string {.
...raises: [IOError, OSError, Exception], tags: [ReadIOEffect, WriteIOEffect].}
-
Stream Read CSV to XML.
proc tsv2csv(csv_file_path: string; separator1: char = '\t';
separator2: char = ','): string {....raises: [IOError],
tags: [ReadIOEffect].}
-
Stream Read TSV to CSV, or any custom format to CSV, simple replace of "," to "t".
proc diff_csvs(csv_file_path0, csv_file_path1: string): seq[Item] {.
...raises: [KeyError, IOError], tags: [ReadDirEffect, ReadIOEffect].}
-
Diff 2 CSV files.