pandas.io.sql.read_sql¶
- pandas.io.sql.read_sql(sql, con, index_col=None, coerce_float=True, params=None)¶
Returns a DataFrame corresponding to the result set of the query string.
Optionally provide an index_col parameter to use one of the columns as the index. Otherwise will be 0 to len(results) - 1.
Parameters : sql: string
SQL query to be executed
con: DB connection object, optional
index_col: string, optional
column name to use for the returned DataFrame object.
coerce_float : boolean, default True
Attempt to convert values to non-string, non-numeric objects (like decimal.Decimal) to floating point, useful for SQL result sets
params: list or tuple, optional
List of parameters to pass to execute method.