@@ -133,7 +133,9 @@ def uquery(sql, con=None, cur=None, retry=True, params=None):
133133 return result
134134
135135
136- def read_frame (sql , con , index_col = None , coerce_float = True , params = None ):
136+ def read_sql (sql , con = None , index_col = None ,
137+ user = None , passwd = None , host = None , db = None , flavor = None ,
138+ coerce_float = True , params = None ):
137139 """
138140 Returns a DataFrame corresponding to the result set of the query
139141 string.
@@ -145,9 +147,19 @@ def read_frame(sql, con, index_col=None, coerce_float=True, params=None):
145147 ----------
146148 sql: string
147149 SQL query to be executed
148- con: DB connection object, optional
150+ con : Connection object, SQLAlchemy Engine object, or a filepath (sqlite
151+ only). Alternatively, specify a user, passwd, host, and db below.
149152 index_col: string, optional
150153 column name to use for the returned DataFrame object.
154+ user: username for database authentication
155+ only needed if a Connection, Engine, or filepath are not given
156+ passwd: password for database authentication
157+ only needed if a Connection, Engine, or filepath are not given
158+ host: host for database connection
159+ only needed if a Connection, Engine, or filepath are not given
160+ db: database name
161+ only needed if a Connection, Engine, or filepath are not given
162+ flavor : string specifying the flavor of SQL to use
151163 coerce_float : boolean, default True
152164 Attempt to convert values to non-string, non-numeric objects (like
153165 decimal.Decimal) to floating point, useful for SQL result sets
@@ -169,8 +181,8 @@ def read_frame(sql, con, index_col=None, coerce_float=True, params=None):
169181
170182 return result
171183
172- frame_query = read_frame
173- read_sql = read_frame
184+ frame_query = read_sql
185+ read_frame = read_sql
174186
175187def write_frame (frame , name , con , flavor = 'sqlite' , if_exists = 'fail' , ** kwargs ):
176188 """
0 commit comments