@@ -456,14 +456,14 @@ def to_sql(
456
456
Parameters
457
457
----------
458
458
frame : DataFrame, Series
459
- name : string
459
+ name : str
460
460
Name of SQL table.
461
461
con : SQLAlchemy connectable(engine/connection) or database string URI
462
462
or sqlite3 DBAPI2 connection
463
463
Using SQLAlchemy makes it possible to use any DB supported by that
464
464
library.
465
465
If a DBAPI2 object, only sqlite3 is supported.
466
- schema : string, default None
466
+ schema : str, optional
467
467
Name of SQL schema in database to write to (if database flavor
468
468
supports this). If None, use default schema (default).
469
469
if_exists : {'fail', 'replace', 'append'}, default 'fail'
@@ -472,18 +472,19 @@ def to_sql(
472
472
- append: If table exists, insert data. Create if does not exist.
473
473
index : boolean, default True
474
474
Write DataFrame index as a column.
475
- index_label : string or sequence, default None
475
+ index_label : str or sequence, optional
476
476
Column label for index column(s). If None is given (default) and
477
477
`index` is True, then the index names are used.
478
478
A sequence should be given if the DataFrame uses MultiIndex.
479
- chunksize : int, default None
480
- If not None, then rows will be written in batches of this size at a
481
- time. If None, all rows will be written at once.
482
- dtype : single SQLtype or dict of column name to SQL type, default None
483
- Optional specifying the datatype for columns. The SQL type should
484
- be a SQLAlchemy type, or a string for sqlite3 fallback connection.
485
- If all columns are of the same type, one single value can be used.
486
- method : {None, 'multi', callable}, default None
479
+ chunksize : int, optional
480
+ Specify the number of rows in each batch to be written at a time.
481
+ By default, all rows will be written at once.
482
+ dtype : dict or scalar, optional
483
+ Specifying the datatype for columns. If a dictionary is used, the
484
+ keys should be the column names and the values should be the
485
+ SQLAlchemy types or strings for the sqlite3 fallback mode. If a
486
+ scalar is provided, it will be applied to all columns.
487
+ method : {None, 'multi', callable}, optional
487
488
Controls the SQL insertion clause used:
488
489
489
490
- None : Uses standard SQL ``INSERT`` clause (one per row).
0 commit comments