to_sql(frame, name: 'str', con, schema: 'str | None' = None, if_exists: 'str' = 'fail', index: 'bool' = True, index_label=None, chunksize: 'int | None' = None, dtype: 'DtypeArg | None' = None, method: 'str | None' = None, engine: 'str' = 'auto', **engine_kwargs) -> 'int | None'
The returned rows affected is the sum of the rowcount
attribute of sqlite3.Cursor
or SQLAlchemy connectable. The returned value may not reflect the exact number of written rows as stipulated in the sqlite3 or SQLAlchemy
Name of SQL table.
or sqlite3 DBAPI2 connection Using SQLAlchemy makes it possible to use any DB supported by that library. If a DBAPI2 object, only sqlite3 is supported.
Name of SQL schema in database to write to (if database flavor supports this). If None, use default schema (default).
fail: If table exists, do nothing.
replace: If table exists, drop it, recreate it, and insert data.
append: If table exists, insert data. Create if does not exist.
Write DataFrame index as a column.
Column label for index column(s). If None is given (default) and :None:None:`index`
is True, then the index names are used. A sequence should be given if the DataFrame uses MultiIndex.
Specify the number of rows in each batch to be written at a time. By default, all rows will be written at once.
Specifying the datatype for columns. If a dictionary is used, the keys should be the column names and the values should be the SQLAlchemy types or strings for the sqlite3 fallback mode. If a scalar is provided, it will be applied to all columns.
Controls the SQL insertion clause used:
SQL engine library to use. If 'auto', then the option io.sql.engine
is used. The default io.sql.engine
behavior is 'sqlalchemy'
Any additional kwargs are passed to the engine.
Number of rows affected by to_sql. None is returned if the callable passed into method
does not return the number of rows.
Write records stored in a DataFrame to a SQL database.
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them