read_pandas

getml.sqlite3.read_pandas(conn, table_name, data_frame, if_exists='append')[source]

Loads a pandas.DataFrame into SQLite3.

Args:
conn:

A sqlite3 connection created by connect().

table_name (str):

The name of the table to write to.

data_frame (pandas.DataFrame):

The pandas.DataFrame to read into the table. The column names must match the column names of the target table in the SQLite3 database, but their order is not important.

if_exists (str):

How to behave if the table already exists:

  • ‘fail’: Raise a ValueError.

  • ‘replace’: Drop the table before inserting new values.

  • ‘append’: Insert new values into the existing table.