libgs.database.KVDb.create_table¶
-
KVDb.
create_table
(name, *columns, **kwargs)¶ Set up the columns and add a unique key.
The Database class can be used without creating a database first, but then pandas will take care of it on first access, and no primary key will be created.
It is therefore encouraged to explicitly create the table with this method in the Database subclass constructor
Note
A primary key column will be automatically added. By default it is called as in the ID_LBL constant. Change by specify primary_key_col=
Parameters: - name – The table to create
- *columns – The list of
sqlalchemy.types.Column
objects to add to the table - primary_key_col (str, optional) – The column to use as primary key (must be sa.Integer type)
Returns: