@@ -2128,8 +2128,35 @@ def read_table(
2128
2128
----------
2129
2129
table_name : str
2130
2130
Name of SQL table in database.
2131
+ coerce_float : bool, default True
2132
+ Raises NotImplementedError
2133
+ parse_dates : list or dict, default: None
2134
+ - List of column names to parse as dates.
2135
+ - Dict of ``{column_name: format string}`` where format string is
2136
+ strftime compatible in case of parsing string times, or is one of
2137
+ (D, s, ns, ms, us) in case of parsing integer timestamps.
2138
+ - Dict of ``{column_name: arg}``, where the arg corresponds
2139
+ to the keyword arguments of :func:`pandas.to_datetime`.
2140
+ Especially useful with databases without native Datetime support,
2141
+ such as SQLite.
2142
+ columns : list, default: None
2143
+ List of column names to select from SQL table.
2131
2144
schema : string, default None
2132
- Name of SQL schema in database to read from
2145
+ Name of SQL schema in database to query (if database flavor
2146
+ supports this). If specified, this overwrites the default
2147
+ schema of the SQL database object.
2148
+ chunksize : int, default None
2149
+ Raises NotImplementedError
2150
+ dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable'
2151
+ Back-end data type applied to the resultant :class:`DataFrame`
2152
+ (still experimental). Behaviour is as follows:
2153
+
2154
+ * ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
2155
+ (default).
2156
+ * ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype`
2157
+ DataFrame.
2158
+
2159
+ .. versionadded:: 2.0
2133
2160
2134
2161
Returns
2135
2162
-------
@@ -2198,12 +2225,34 @@ def read_query(
2198
2225
dtype_backend : DtypeBackend | Literal ["numpy" ] = "numpy" ,
2199
2226
) -> DataFrame | Iterator [DataFrame ]:
2200
2227
"""
2201
- Read SQL query into a DataFrame. Keyword arguments are discarded.
2228
+ Read SQL query into a DataFrame.
2202
2229
2203
2230
Parameters
2204
2231
----------
2205
2232
sql : str
2206
2233
SQL query to be executed.
2234
+ index_col : string, optional, default: None
2235
+ Column name to use as index for the returned DataFrame object.
2236
+ coerce_float : bool, default True
2237
+ Raises NotImplementedError
2238
+ params : list, tuple or dict, optional, default: None
2239
+ Raises NotImplementedError
2240
+ parse_dates : list or dict, default: None
2241
+ - List of column names to parse as dates.
2242
+ - Dict of ``{column_name: format string}`` where format string is
2243
+ strftime compatible in case of parsing string times, or is one of
2244
+ (D, s, ns, ms, us) in case of parsing integer timestamps.
2245
+ - Dict of ``{column_name: arg dict}``, where the arg dict
2246
+ corresponds to the keyword arguments of
2247
+ :func:`pandas.to_datetime` Especially useful with databases
2248
+ without native Datetime support, such as SQLite.
2249
+ chunksize : int, default None
2250
+ Raises NotImplementedError
2251
+ dtype : Type name or dict of columns
2252
+ Data type for data or columns. E.g. np.float64 or
2253
+ {'a': np.float64, 'b': np.int32, 'c': 'Int64'}
2254
+
2255
+ .. versionadded:: 1.3.0
2207
2256
2208
2257
Returns
2209
2258
-------
@@ -2263,7 +2312,6 @@ def to_sql(
2263
2312
) -> int | None :
2264
2313
"""
2265
2314
Write records stored in a DataFrame to a SQL database.
2266
- Only frame, name, if_exists, index and schema are valid arguments.
2267
2315
2268
2316
Parameters
2269
2317
----------
@@ -2274,25 +2322,37 @@ def to_sql(
2274
2322
- fail: If table exists, do nothing.
2275
2323
- replace: If table exists, drop it, recreate it, and insert data.
2276
2324
- append: If table exists, insert data. Create if does not exist.
2325
+ index : boolean, default True
2326
+ Write DataFrame index as a column.
2327
+ index_label : string or sequence, default None
2328
+ Raises NotImplementedError
2277
2329
schema : string, default None
2278
2330
Name of SQL schema in database to write to (if database flavor
2279
2331
supports this). If specified, this overwrites the default
2280
2332
schema of the SQLDatabase object.
2333
+ chunksize : int, default None
2334
+ Raises NotImplementedError
2335
+ dtype : single type or dict of column name to SQL type, default None
2336
+ Raises NotImplementedError
2337
+ method : {None', 'multi', callable}, default None
2338
+ Raises NotImplementedError
2339
+ engine : {'auto', 'sqlalchemy'}, default 'auto'
2340
+ Raises NotImplementedError if not set to 'auto'
2281
2341
"""
2282
2342
if index_label :
2283
2343
raise NotImplementedError (
2284
2344
"'index_label' is not implemented for ADBC drivers"
2285
2345
)
2286
- if schema :
2287
- raise NotImplementedError ("'schema' is not implemented for ADBC drivers" )
2288
2346
if chunksize :
2289
2347
raise NotImplementedError ("'chunksize' is not implemented for ADBC drivers" )
2290
2348
if dtype :
2291
2349
raise NotImplementedError ("'dtype' is not implemented for ADBC drivers" )
2292
2350
if method :
2293
2351
raise NotImplementedError ("'method' is not implemented for ADBC drivers" )
2294
2352
if engine != "auto" :
2295
- raise NotImplementedError ("'auto' is not implemented for ADBC drivers" )
2353
+ raise NotImplementedError (
2354
+ "engine != 'auto' not implemented for ADBC drivers"
2355
+ )
2296
2356
2297
2357
if schema :
2298
2358
table_name = f"{ schema } .{ name } "
0 commit comments