CGATcore CSV2DB Module¶
CSV2DB.py - utilities for uploading a table to database¶
:Tags: Python
Purpose¶
create a table from a csv separated file and load data into it.
This module supports backends for postgres and sqlite3. Column types are auto-detected.
.. todo::
Use file import where appropriate to speed up loading. Currently, this is not always the case.
Usage¶
Documentation¶
Code¶
to_sql_pkey(self, frame, name, if_exists='fail', index=True, index_label=None, schema=None, dtype=None, **kwargs)
¶
Function to load a table with the reqirement for a primary key.