From c3800c70f40b2c5c100e1cf6a7947a35cef59781 Mon Sep 17 00:00:00 2001 From: azuranski Date: Fri, 9 Oct 2015 17:13:17 -0400 Subject: [PATCH] Update sql.py Fix documentation for index_col parameter to read_sql, read_sql_table and read_sql_query to reflect that a list can be passed. --- pandas/io/sql.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pandas/io/sql.py b/pandas/io/sql.py index 721a2c1f350ee..799d1e88260f2 100644 --- a/pandas/io/sql.py +++ b/pandas/io/sql.py @@ -309,8 +309,8 @@ def read_sql_table(table_name, con, schema=None, index_col=None, schema : string, default None Name of SQL schema in database to query (if database flavor supports this). If None, use default schema (default). - index_col : string, optional, default: None - Column to set as index + index_col : string or list of strings, optional, default: None + Column(s) to set as index(MultiIndex) coerce_float : boolean, default True Attempt to convert values to non-string, non-numeric objects (like decimal.Decimal) to floating point. Can result in loss of Precision. @@ -384,8 +384,8 @@ def read_sql_query(sql, con, index_col=None, coerce_float=True, params=None, Using SQLAlchemy makes it possible to use any DB supported by that library. If a DBAPI2 object, only sqlite3 is supported. - index_col : string, optional, default: None - Column name to use as index for the returned DataFrame object. + index_col : string or list of strings, optional, default: None + Column(s) to set as index(MultiIndex) 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 @@ -443,8 +443,8 @@ def read_sql(sql, con, index_col=None, coerce_float=True, params=None, Using SQLAlchemy makes it possible to use any DB supported by that library. If a DBAPI2 object, only sqlite3 is supported. - index_col : string, optional, default: None - column name to use as index for the returned DataFrame object. + index_col : string or list of strings, optional, default: None + Column(s) to set as index(MultiIndex) 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