def create_table_from_data_matrix(<EOL>self,<EOL>table_name,<EOL>attr_names,<EOL>data_matrix,<EOL>primary_key=None,<EOL>add_primary_key_column=False,<EOL>index_attrs=None,<EOL>):
self.__create_table_from_tabledata(<EOL>TableData(table_name, attr_names, data_matrix),<EOL>primary_key,<EOL>add_primary_key_column,<EOL>index_attrs,<EOL>)<EOL>
Create a table if not exists. Moreover, insert data into the created
table.

:param str table_name: Table name to create.
:param list attr_names: Attribute names of the table.
:param data_matrix: Data to be inserted into the table.
:type data_matrix: List of |dict|/|namedtuple|/|list|/|tuple|
:param str primary_key: |primary_key|
:param tuple index_attrs: |index_attrs|
:raises simplesqlite.NameValidationError:
    |raises_validate_table_name|
:raises simplesqlite.NameValidationError:
    |raises_validate_attr_name|
:raises ValueError: If the ``data_matrix`` is empty.

:Example:
    :ref:`example-create-table-from-data-matrix`

.. seealso::
    :py:meth:`.create_table`
    :py:meth:`.insert_many`
    :py:meth:`.create_index_list`