------------------------------------------------- lines 7-65 of file: at_cascade/csv/write_table.py ------------------------------------------------- {xrst_begin csv.write_table} {xrst_spell len } Create A CSV File from a Table ############################## Prototype ********* {xrst_literal BEGIN_DEF END_DEF } table ***** This must be a ``list`` of ``dict``. columns ******* This is a ``list`` of ``str`` specifying the keys in the table dictionary that are written to the file. If this argument is ``None`` , *table* [0].keys() is used as its default value. If :ref:`csv.read_table-name` returns am empty table, :ref:`csv.get_header-name` can be used to determine the column names. file_name ********* is a ``str`` with the name of the CSV file. Upon return, this file has ``len(`` *table* ``)`` + 1 lines, ``len(`` *columns* ``)`` columns, with the following values .. list-table:: * - columns[0] - columns[1] - columns[2] - ... * - table[0][ columns[0] ] - table[0][ columns[1] ] - table[0][ columns[2] ] - ... * - table[1][ columns[0] ] - table[1][ columns[1] ] - table[1][ columns[2] ] - ... * - \: - \: - \: - ... Example ******* :ref:`csv.table-name` {xrst_end csv.write_table}