I want to read data from my oracle, I use the pandas's read_sql
and set the parameter chunksize=20000
,
from sqlalchemy import create_engine
import pandas as pd
engine = create_engine("my oracle")
df = pd.read_sql("select clause",engine,chunksize=20000)
It returns a iterator, and I want to convert this generator to a dataframe usingdf = pd.DataFrame(df)
, but it's wrong, How can the iterator be converted to a dataframe?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…