----------------------------------------------------- lines 6-49 of file: python/dismod_at/replace_table.py ----------------------------------------------------- # {xrst_begin replace_table} # {xrst_spell # tbl # } # {xrst_comment_ch #} # # Replace A a Table # ################# # # Syntax # ****** # # ``dismod_at.replace_table`` ( *connection* , *tbl_name* , *table_dict* ) # # connection # ********** # is a :ref:`create_connection@connection` for this database. # # table_name # ********** # is a ``str`` that specifies the name of a table that already in the # database. # # table_dict # ********** # is a ``list`` with each element of the list is a dictionary. # Each dictionary contains a key for every column name in the original table. # The columns in the original table are written to the new table with the # same order and types as in the original table. Only the values are replaced # using the values in *table_dict* . # # Primary Key # *********** # This routine assumes the primary key is an integer, corresponds # to the first column, and has name *tbl_name* _ ``id`` . # {xrst_toc_hidden # example/table/replace_table.py # } # Example # ******* # The file :ref:`replace_table.py-name` is an example use of # ``replace_table`` . # # {xrst_end replace_table}