aryagraph.io.edgelist.write_edgelist#

aryagraph.io.edgelist.write_edgelist(g: Graph, path: str | PathLike, *, delimiter: str = ',', attrs: bool | Sequence[str] = True, header: bool = True, isolates: bool = True, encoding: str = 'utf-8') → None[source]#

Write g as a delimited edge list (CSV by default).

Parameters:
  • delimiter – "," (CSV), "\t" (TSV), " " (whitespace-separated), …

  • attrs – True writes one column per edge attribute (the union of all keys, in first-seen order; missing values stay empty), False none, or a list of attribute names.

  • header – Write the source,target,<attrs> header line.

  • isolates – Also write nodes without edges, as lines with an empty target, so read_edgelist() restores them. (Other tools may not understand such lines; pass False for a pure edge list.)