📜  雅典娜连接器python代码示例

📅  最后修改于: 2022-03-11 14:45:07.315000             🧑  作者: Mango

代码示例1
from pyathena import connect
from pyathena.util import as_pandas

cursor = connect(aws_access_key_id="YOUR_ACCESS_KEY_ID",
                 aws_secret_access_key="YOUR_SECRET_ACCESS_KEY",
                 s3_staging_dir="s3://YOUR_S3_BUCKET/path/to/",
                 region_name="us-west-2").cursor()
cursor.execute("SELECT * FROM many_rows")
df = as_pandas(cursor)
print(df.describe())