def execute(sql, con, cur=None, params=None):
if cur is None:<EOL><INDENT>pandas_sql = pandasSQL_builder(con)<EOL><DEDENT>else:<EOL><INDENT>pandas_sql = pandasSQL_builder(cur, is_cursor=True)<EOL><DEDENT>args = _convert_params(sql, params)<EOL>return pandas_sql.execute(*args)<EOL>
Execute the given SQL query using the provided connection object.

Parameters
----------
sql : string
    SQL query to be executed.
con : SQLAlchemy connectable(engine/connection) or sqlite3 connection
    Using SQLAlchemy makes it possible to use any DB supported by the
    library.
    If a DBAPI2 object, only sqlite3 is supported.
cur : deprecated, cursor is obtained from connection, default: None
params : list or tuple, optional, default: None
    List of parameters to pass to execute method.

Returns
-------
Results Iterable