Pandas/SQAalchemy 连接 oracle
import cx_Oracle
from sqlalchemy import create_engine
dsn = cx_Oracle.makedsn(ip, port, service_name='sttest')
engine = create_engine('oracle+cx_oracle://{0}:{1}@{2}'.format(user, pwd, dsn))
sql = '''select * FROM STATS.{0} where rownum<=30'''.format(tn, ID)
content = pd.read_sql_query(sql, engine, chunksize=10)
for i in content:
print(i.shape)